![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replace certain character with a new a new line. | djsal | Shell Programming and Scripting | 8 | 01-11-2008 12:59 PM |
| to replace a new line character | chan | Shell Programming and Scripting | 2 | 01-11-2008 12:56 PM |
| Replace a character in last line | Mohammed | Shell Programming and Scripting | 6 | 08-01-2007 02:46 PM |
| How to replace a character in a file | preethgideon | Shell Programming and Scripting | 6 | 08-30-2006 06:19 PM |
| How would you replace the n character in a file with some xyz? | JosephGerard | UNIX for Dummies Questions & Answers | 2 | 07-21-2005 08:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Is there a simple way to replace the 9th character of every line in a text file?
Right now it is a space and instead I want to stick in a 0, every line is the same. Is there a quick way to do this in Unix? (Solaris) |
|
||||
|
Worked perfect, thanks.
Can you explain how it works though? awk '{print substr($0,1,8) "0" substr($0,10)}' file1 > file2 I understand the awk part, the "0" part, and the file1 > file2 part but the substr part.. I see that it works but not why it does. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|