Computing.Net > Forums > Programming > Script to change values linebyline

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Script to change values linebyline

Reply to Message Icon

Name: Vini
Date: February 1, 2009 at 21:15:21 Pacific
OS: AIX
Subcategory: General
Comment:

Hi,
I’m struggling to write a script to do the following,
-will go through each line in the file
-in a specific character positions, changes
the value to a new value
-----------------------
e.g.: file1.sh will have the following 3 lines,

line1 aaaa
line2 bbbb
line3 cccc

After executing the script, content of file1.sh should be,

line1 a1aa
line2 b1bb
line3 ccc1
-----------------------

Guru's, thanks a ton in advance
Vini



Sponsored Link
Ads by Google

Response Number 1
Name: Vini99
Date: February 1, 2009 at 22:08:22 Pacific
Reply:

Hi,
When i ment "specific character positions", the fields that need to be changed are fixed position.
Eg: It will be always 2nd and 7th character postion throughout the lines in the file.

Thanks again
Vini


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Script to change values linebyline

VB script to change favorites path www.computing.net/answers/programming/vb-script-to-change-favorites-path/13780.html

Batch to change desktop wallpaper? www.computing.net/answers/programming/batch-to-change-desktop-wallpaper/15105.html

Script to Del files based on size www.computing.net/answers/programming/script-to-del-files-based-on-size/18376.html