I frequently need to copy text files that are updated in one folder to another. I also need to run dos2unix (to convert line terminations from crlf to lf) on each file that gets copied....
My script does something like this,
cp -uv /${DIR}/${file} ./
I'd like to run dos2unix on the files that are copied. I know that you can do something like this:
ls | sort
to call sort on the output from ls...
so, I want to do something like this:
cp -uv /${DIR}/${file} ./ | dos2unix -k
(the -k keeps the same timestamp as the source file)
which kinda work, but I get a prompt from cp, like so:
cp: overwrite `./abstractSyntaxTree.cc'?
why am I getting this prompt?
My script does something like this,
cp -uv /${DIR}/${file} ./
I'd like to run dos2unix on the files that are copied. I know that you can do something like this:
ls | sort
to call sort on the output from ls...
so, I want to do something like this:
cp -uv /${DIR}/${file} ./ | dos2unix -k
(the -k keeps the same timestamp as the source file)
which kinda work, but I get a prompt from cp, like so:
cp: overwrite `./abstractSyntaxTree.cc'?
why am I getting this prompt?