Change header of all text files in directory in commandline I have tons of *.csv measurement files with following header: 

Start time: Thu Oct 09 15:46:16 CST 2014 
Trend type: Average Wavelength over [259.09, 259.09] 
Trend offset: None 
&gt;&gt;&gt;&gt;&gt;Begin Strip Chart Data&lt;&lt;&lt;&lt;&lt;
Date    Elapsed Time    Absorbance(Absorbance)


How can I change this with command-line in the whole directory to following header: 

Date    ElapsedTime Absorbance


Cheers,

Hans
This will remove first four lines form csv files and remove "(Absorbance)" part from them:

find . -name  "*\.csv" -exec \
    bash -c "tail -n +5 {} |
                 sed 's/Absorbance(Absorbance)/Absorbance/' |
                 sed 's/Elapsed Time/ElapsedTime/' &gt; {}.bak |
                 mv {}.bak {}" \;