Reputation
1,357
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
7 15
Newest
 Explainer
Impact
~234k people reached

Apr
13
comment Edit text iteratively within a file using commands
@EliahKagan: Yes, but it is not pretty, besides according to the OPs comment, it seems the white-space is there due to a formatting error. Anyway, if you really wanted to accommodate white-space at the beginning, something like this would work: file=infile; paste -d '' <(sed -r 's/^(\s*).*/\1/' $file) <(sed -r 's/^\s*//' $file | awk '{ORS=RT; print NR":"$0}' RS='[ \n]+').
Apr
13
comment Edit text iteratively within a file using commands
@YUVRAJ: write it to a temporary file and overwrite the original after, as suggested by John1024.
Apr
12
answered Edit text iteratively within a file using commands
Mar
5
answered awk: matching strings to decimal values and summing them
Mar
3
revised Remove all text before last space in text file from CLI
added awk example
Mar
2
answered Remove all text before last space in text file from CLI
Feb
26
revised How to stock all files with the same suffix into a table?
added 107 characters in body
Feb
26
revised How to stock all files with the same suffix into a table?
Added references for find print0 comment
Feb
26
comment How to stock all files with the same suffix into a table?
@muru: I have not seen that one before. Good to know, thanks.
Feb
26
answered How to stock all files with the same suffix into a table?
Feb
18
answered Grep strings in a subgroup of lines in txt file
Sep
30
awarded  Explainer
Sep
12
revised Evaluate Expression within awk
Added code formatting
Sep
12
suggested approved edit on Evaluate Expression within awk
Sep
12
comment Evaluate Expression within awk
Please add this information together with a sample test file to the question by using the edit function,
Sep
12
comment Evaluate Expression within awk
You want to use the pipe notation and getline for getting output from external commands, see this manual page for example. BUT depending on what you are trying to do, which is not clear from the example, this might not be the way to go.
Sep
12
revised Evaluate Expression within awk
Added code formatting
Sep
12
suggested approved edit on Evaluate Expression within awk
Aug
27
comment Cannot connect to X Server when running app with sudo
You should add your solution as an answer, it would make it easier for others to find.
Aug
1
awarded  Good Answer