Hi,
I create a csv file and the output looks like below
Arun,E001
Sathish,E003
Now i need to include the below header and the output should like below
Name,Number
Arun,E001
Sathish,E003
Please guide me.
Thanks
Hi,
I create a csv file and the output looks like below
Arun,E001
Sathish,E003
Now i need to include the below header and the output should like below
Name,Number
Arun,E001
Sathish,E003
Please guide me.
Thanks
Try this....
printf '1i\nName,Number\n.\nwq!\n' | ex Yourfile
Try this,
# cat file
Arun,E001
Sathish,E003
# sed -i.bak '1 i\
Name,Number' file
# cat file
Name,Number
Arun,E001
Sathish,E003
Hi,
Thanks for your response. I need the header to be copied eventhough there is no records. But the above command is throwing buffer error.
Please help me out
Thanks
Plz post the error you are getting... and also please make sure to keep more clarity while posting...