I have a shell script which output like some thing below
1.2.3.4
1.2.3.5
1.2.3.6
------
Start of CSV
-------
id ,number ,name ,location
1,101,asp,xyz
2,102,dsp,ert
Now i need to redirect this output to csv file but from particular line number. i mean, first i need to skip first 3 lines , redirect rest to csv output
Sed works..thank you but I need one more suggestion
I am getting extra , (comma) at end of line, so i need to remove it.. so trying below, but it saying syntax error line 2. at > /home/centos/abc.csv
#!/bin/bash
sh /home/centos/du.sh | sed 1,124d > /home/centos/abc.csv
for fname in abc.csv
do
cat $fname | sed 's/.$//' > tmp.tmp
mv tmp.tmp $fname
done