775 reputation
69
bio website
location
age
visits member for 4 years, 4 months
seen Dec 14 at 11:39

Jun
16
awarded  Constituent
Jun
9
awarded  Caucus
Mar
6
awarded  Popular Question
Aug
17
awarded  Yearling
Jul
4
awarded  Good Answer
Aug
17
awarded  Yearling
Oct
29
awarded  Nice Answer
Aug
18
awarded  Yearling
Jul
21
revised redirection and pipeline
fix foo/bar typo
Jul
21
suggested approved edit on redirection and pipeline
Apr
12
comment Is there any alternative to grep's -A -B -C switches (to print few lines before and after )?
The shift @A if push(@A,$_)>7; bit only keeps an array of maximum size 7 around. (that's your -A parameter). The second option keeps an incredibly small file around (just run the perl without the sed outer layer to see what is generated there), but it does read the file twice.
Apr
12
awarded  Editor
Apr
12
revised Is there any alternative to grep's -A -B -C switches (to print few lines before and after )?
added 180 characters in body; added 14 characters in body
Apr
12
answered Is there any alternative to grep's -A -B -C switches (to print few lines before and after )?
Feb
3
answered vim - but with scrolling, clickable text, and copy-paste
Feb
3
comment Changing the PS1 on an interactive bash subshell easily
The usecase is pretty simple... the utility does a fairly complex transformation on a vendor's code repo, importing it to a local mercurial repo. Prints a bunch of status details out (like how many roots/heads/branches the resulting repo has), and then launches a shell to let the user investigate further. When they finish, the script asks if it should continue with the "difficult to undo" parts of the process. (In summary... privs aren't an issue here, but I want to make the users as comfortable with their own settings as possible)
Feb
2
awarded  Scholar
Feb
2
accepted Changing the PS1 on an interactive bash subshell easily
Feb
2
awarded  Student
Feb
2
asked Changing the PS1 on an interactive bash subshell easily