Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Substitute Line

Status
Not open for further replies.

rhnaeco

Technical User
Aug 11, 2005
45
I have lots of files with several hundred rows and columns.
I would like to substitute one line and keep the others as is. For that line I would like to add 0.8 to each column

input:
a,s,d,f,g,h
1,2,3,4,5,6
ed,rf,hg,rt,fg,kj

output:
a,s,d,f,g,h
1.8,2.8,3.8,4.8,5.8,6.8
ed,rf,hg,rt,fg,kj


but only if there is something in that column as some columns are empty (always the first 10 columns, and last 4)

I'm pretty sure sub and NR play some part but I'm not sure how to do it and make sure the rest of the file is untouched.

any help is much appreciated

R
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top