I would like to prepend a column in CSV File in Linux by passing parameters in at run time.
For example my input File Input.csv has the following contents:
abc,Nodes.csv
def,Nodes.csv
ghi,Nodes.csv
jkl,Nodes.csv
Now I would like to pass a parameter in at run time while running the script like ./Datafile.sh CRE_ff
The output file should look like this:
CRE_ff_Nodes_abc,abc,Nodes.csv
CRE_ff_Nodes_abc,def,Nodes.csv
CRE_ff_Nodes_abc,ghi,Nodes.csv
CRE_ff_Nodes_abc,jkl,Nodes.csv
CRE_ff_Nodes_abcis composed ... In your example output it's the same for all lines ... And please show us what you tried, as there are similar questions around, and it should be fairly easy to find an answer...