The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Specifying and replacing fields with awk
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Specifying and replacing fields with awk
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
11-19-2008
Christoph Spohr
Registered User
Join Date: Sep 2008
Posts: 205
Hi,
i don't know exactly what you are trying to do, but if you only want to change line 2 of you file, this should be enough:
Code:
sed
"/^99/s/,,,/,0,0,/g" file
Which means: go to the line starting with 99 and on this line substitute three kommas in row by ,0,0,
HTH Chris
Christoph Spohr
View Public Profile
Find all posts by Christoph Spohr
Find Christoph Spohr's past nominations received
Find Christoph Spohr's present nominations given