The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 11-19-2007
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,119
sed 's/^\(.\)\{11\}//g' forsed
will delete the first 11 characters from each line

sed '1s/^\(.\)\{11\}//g' forsed
will delete the first 11 characters from the first line but the first line must contain 11 or more characters

Ignoring line boundaries will be hard using sed. To ignore line boundaries and simply delete the first n characters you might want to consider switching to dd.