Quote:
In my file name Test.SH
I have only this command
Cp fileA.csv fileB.csv
perl -i.bak -0777 -ple's/(".*?)[\r\n]*(.*?")/$1$2/g' fileA.csv
So apart from the typo in the cp command name
I assume the above is the contents of file Test.SH
which you made executable (e.g. by chmod u+x Test.SH).
(Btw, why the extra copy of fileA.csv to fileB.csv beforehand?
Your Perl oneliner is called with the in-place-editing option
-i
which will automatically dump a backup copy fileA.csv.bak for you)
But then you continue with
Quote:
Now I want to run this file
I did
./file.csv
which makes no sense to me at all.
Of course, does the shell complain that the file doesn't exist.
Wasn't it ./Test.SH you wanted to execute?