if [ !-f /tmp/foo.txt ]; thenecho"File not found!"fi
Manipulate CSV file
csv_split.sh
# Manipulate csv data using bash## You can use read to split the CSV, then output the desired number of# columns.cattest.csv|whilereadline; do IFS=\; read-raCOL<<<"$line"echo"${COL[0]};${COL[1]};${COL[2]};${COL[3]};${COL[4]};"done# For example, with test.csv containing:1;2;3;41;2;3;4;51;2;3;4;1;2;3;4;5;# The above script outputs:1;2;3;4;;1;2;3;4;5;1;2;3;4;;1;2;3;4;5;