Computing.Net > Forums > Unix > sed script

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.

sed script

Reply to Message Icon

Name: uny
Date: September 1, 2009 at 21:13:13 Pacific
OS: Windows XP
Product: Cisco Ciscosecure access control servers for unix
Subcategory: General
Tags: sed script
Comment:

How to replace the 4th character of each row in a file by another character by sed script?



Sponsored Link
Ads by Google

Response Number 1
Name: user57
Date: September 1, 2009 at 23:58:34 Pacific
Reply:

Try:

cat input| sed 's/./!/4'

Replacing the 4th char with an exclamation mark (or whatever you desire).


0

Response Number 2
Name: uny
Date: September 3, 2009 at 00:58:48 Pacific
Reply:

thanks, it works!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: sed script

need help on SED script www.computing.net/answers/unix/need-help-on-sed-script/7487.html

sed script www.computing.net/answers/unix/sed-script/6713.html

shell script/sed/awk www.computing.net/answers/unix/shell-scriptsedawk/5025.html