[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] help with a tiny shell script - correction



Quoting Christopher Bergeron <christopher at bergeron.com>:

> Correction:  the for line should read:
> for i in `\ls *.csv`; do cat $i >> append.csv; echo -e "\n" >> 
> append.csv; done
> (for i in backtick backslash ls start dot csv backtick semicolon ...)
> 
> Also, it should be noted that this will concatenate the output of EVERY 
> .csv file in that directory.  If you have .csv files you don't want 
> appended to "append.csv" you need to make adjustments accordingly.
> 
> Kind regards,
> CB

you should be able to do 
$ for i in *.csv; do cat $i >> append.csv; echo -e "\n" >> append.csv; done

Jonathan

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/