
December 18th, 2012, 07:04 PM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 1
Time spent in forums: 7 m 30 sec
Reputation Power: 0
|
|
|
Search - Verify and Replace
Hello All,
I am fairly new to Unix and looking for a solution for a below prob
Content of a file x
223001ABCD
2210015ABCD
221007ABCD
2230015ABCD
223004ABCD
I am looking for a way where I need to search in the file
1. First for Unit Code - '223' ( Position 1 to 3)
2. If Position 6 is '1' & Position 7 between '0' & '5'
do nothing
else
Add space on position 6
The Modified output inside file x
22300 1ABCD
2210015ABCD
221007ABCD
2230015ABCD
22300 4ABCD
|