![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| deleting a line but keeping the same file | laiko | UNIX for Dummies Questions & Answers | 2 | 05-13-2008 11:08 AM |
| Deleting lines above a certain line | eltinator | Shell Programming and Scripting | 3 | 10-11-2007 11:29 AM |
| Deleting First Two Characters On Each Line | scotbuff | Shell Programming and Scripting | 5 | 12-15-2006 10:03 PM |
| Checking the last line and deleting | srivsn | Shell Programming and Scripting | 3 | 12-13-2005 11:04 AM |
| Deleting UNIX End of Line Chachracter \000 | uchachra | UNIX for Advanced & Expert Users | 3 | 12-22-2004 06:56 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#8
|
||||
|
||||
|
Quote:
Quote:
Now run: Quote:
Quote:
|
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
For deleting first n number of chars
For deleting first n number of chars, instead of writing 'n' dots(.), following pattern can be used -
^.\{n\} so the sed can be changed to cat testA |sed 's/^.\{n\}//' > testB |
|
#10
|
|||
|
|||
|
Quote:
if you want to change all the file name as u required then this might help u ls | while read file do file_req=`echo ${file} | sed 's/^.\{n\}//' ` mv ${file} ${file_req} done |
|||
| Google The UNIX and Linux Forums |