![]() |
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 |
| Trying to remove '^M' characters from a file. | Krispy | Shell Programming and Scripting | 13 | 05-12-2009 05:46 PM |
| sed remove last 10 characters of a line start from 3rd line | minifish | Shell Programming and Scripting | 7 | 03-26-2008 04:42 PM |
| How to remove FIRST Line of huge text file on Solaris | madoatz | UNIX for Dummies Questions & Answers | 5 | 06-23-2007 01:19 PM |
| how to remove line greater then 3000 characters. | naren_14 | UNIX for Advanced & Expert Users | 10 | 06-15-2005 11:00 PM |
| Replacing all but last Hex characters in a text line | BAH | Shell Programming and Scripting | 2 | 03-26-2004 04:00 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
sed to remove 1st two characters every line of text file
what is the sed command to remove the first two characters of every line of a text file?
each line of the text file has the same amount of characters, and they are ALL NUMERIC. there are hundreds of lines though. for example, >cat file1.txt 10081551 10081599 10082234 10082259 20081134 20081159 30082232 10087721 > I want the end result to remove the first two digits of each line >cat file2.txt 081551 081599 082234 082259 081134 081159 082232 087721 > Thank you so much!! |
|
||||
|
thank you!
thank you all! I'll probably make a new post, but I actually need the last two characters removed also....
>cat file1.txt 10081551 10081599 10082234 10082259 20081134 20081159 30082232 10087721 > ends up looking like: >cat file1.txt 100815 100815 100822 100822 200811 200811 300822 100877 > |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|