Append a New Column in a CSV File in Linux

2 次查看(过去 30 天)
Hi,
I would like to append a new column in a csv file in linux via the parameters being passed
For Eg Input File
UID,Column_Nodes.csv
CLASS,Column_Nodes.csv
SUBCLASS,Column_Nodes.csv
BUS_NAME,Column_Nodes.csv
My Output file Should be like when i run the script ./Datafile.sh i need to pass the parameter with the application name like ./Datafile.sh CRE_FF and my output file should like this
CRE_FF_Column_Nodes_UID,UID,Column_Nodes.csv
CRE_FF_Column_Nodes_UID,CLASS,Column_Nodes.csv
CRE_FF_Column_Nodes_UID,SUBCLASS,Column_Nodes.csv
CRE_FF_Column_Nodes_UID,BUS_NAME,Column_Nodes.csv
The Parameter passed needs to get appened with the 3rd column and 2nd column.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Standard File Formats 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by