The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-25-2003
Perderabo's Avatar
Perderabo Perderabo is online now
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,355
You can't use the same file for input and output. The shell is destroying your input file by preparing to to write into it. This is done before the sed command even gets a chance to run.

Send the output to a tmpfile or something, then
mv tmpfile get_columns.sh