6,069 reputation
1342
bio website toggle.be/~ta
location Denmark
age 37
visits member for 2 years, 8 months
seen Dec 18 at 23:44

I'm trained in computer science engineering, but have a wide range of other interests as well.


Nov
25
awarded  Enlightened
Nov
25
awarded  Nice Answer
Nov
13
comment Output part of each line to a separate file
@StéphaneChazelas: I see, and it has been there for a while. I did not know about this, thanks for telling me.
Nov
13
comment Output part of each line to a separate file
@glennjackman: This was just an interesting alternative way of doing it. If the input is large, awk is probably the most efficient tool to use. You are of course right about not spawning sh for each line, I have added the pipe-option as an alternative.
Nov
13
comment Output part of each line to a separate file
If there are many lines, all available file descriptors will be used, so you should probably add a close($1".seq").
Nov
13
revised Output part of each line to a separate file
A more efficient alternative added
Nov
12
answered Output part of each line to a separate file
Oct
27
comment Print a line only if the next line does NOT contain a particular match
@lmmx: It is needed because otherwise the capture group needs to be escaped, and the same goes for the + quantifier.
Oct
23
comment How can I do the `history` command and not have line numbers so I can copy multiple line commands?
@Fedir: Interesting, which shell is this under?
Oct
15
awarded  bash
Oct
1
reviewed Approve Extract/print every 3rd occurence of pattern
Sep
30
awarded  Explainer
Aug
29
comment How to copy rows of different files and paste column-wise?
A similar question is answered here, but with focus on shell processing.
Aug
11
comment Only return the matched string in sed
@danielsokolowski: this example uses basic regular expressions (BRE) and thus capture groups are noted with escaped parentheses. If you add -r to the above you should get an error saying "invalid reference". What version of sed are you using?
Jul
18
awarded  Enlightened
Jul
18
awarded  Nice Answer
Jun
23
comment UNIX paste columns and insert zero's for all missing values
@biobudhan: No this produces space separated columns. I updated the answer to (more correctly) use OFS when generating the table. With this change you can specify the output separator by setting OFS on the command line, either awk -v OFS='\t' -f merge.awk FILES or as a post argument awk -f merge.awk OFS='\t' FILES.
Jun
23
revised UNIX paste columns and insert zero's for all missing values
Use OFS when generating the table
Jun
22
comment Remove comma between the quotes only in a comma delimited file
@CocoaEv: It executes { print $0 }. I added that to the explanation as well.
Jun
22
revised Remove comma between the quotes only in a comma delimited file
Embellished the explanation