Timeline for How to number a string in each line of a file
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 1, 2015 at 1:20 | comment | added | John1024 | @ScottE Your version of the code has an extra comma. Remove that comma so that the code is identical to cuonglm's and it will work. | |
| Aug 1, 2015 at 1:17 | comment | added | mikeserv | This is pretty cool, I think. But can answer to the asker's complaint here? | |
| Jul 30, 2015 at 19:36 | history | edited | h3rrmiller | CC BY-SA 3.0 |
explained the awk syntax and removed stdin/stdout redirection to avoid confusion
|
| Jul 30, 2015 at 18:33 | review | Low quality posts | |||
| Jul 30, 2015 at 19:34 | |||||
| Jul 30, 2015 at 18:28 | history | edited | cuonglm | CC BY-SA 3.0 |
edited body
|
| Jul 30, 2015 at 18:26 | comment | added | Sco | Apprantly I cannot format these comments correctly :) | |
| Jul 30, 2015 at 18:25 | comment | added | cuonglm | @ScottE: new output is file2.txt | |
| Jul 30, 2015 at 18:23 | comment | added | Sco | Thanks for your reponse. I just tried this. But it is not correct. What should I do differently? $ awk '$1=$1,FNR' <file.txt >file2.txt; cat file2.txt line_ some text line_ oaasdfa asdf line_ asdfasdf | |
| Jul 30, 2015 at 18:16 | history | answered | cuonglm | CC BY-SA 3.0 |