[CentOS] Vim scripting - cursor motion
John Doe
jdmls at yahoo.comFri Jun 10 09:55:38 UTC 2011
- Previous message: [CentOS] Vim scripting - cursor motion
- Next message: [CentOS] Vim scripting - cursor motion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Jussi Hirvi <listmember at greenspot.fi> > :% s/\t/","/g > Then I should add something to the beginning of file (line 1, char 1). > And append something to the end of the file (last line, last char). But > I cannot find a way to do this. Should I move the cursor (and how?), or > what? echo "First Line" > NEWFILE cat FILE | tr '\t' ',' >> NEWFILE or sed 's/\t/,/g' FILE >> NEWFILE echo "Last Line" >> NEWFILE or awk ' BEGIN { print "First Line"; } { gsub(/\t/, ",", $0);print $0; } END { print "Last Line"; } ' FILE > NEWFILE JD
- Previous message: [CentOS] Vim scripting - cursor motion
- Next message: [CentOS] Vim scripting - cursor motion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list