coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cp without overwriting files but printing warning messages automatic


From: Peng Yu
Subject: Re: cp without overwriting files but printing warning messages automatically?
Date: Sun, 10 Mar 2013 05:17:50 -0500

On Sun, Mar 10, 2013 at 5:06 AM, CoreUtils subscribtion for PLC
<address@hidden> wrote:
> yes can answer no :-D
>
> thus "yes n | cp -i" should do the job

The warning messages are at the same line. Is there a way to make each
warning message printed in a different line?

mkdir -p c d/c
echo c/a > c/a.txt
echo c/b > c/b.txt
echo d/c/a > d/c/a.txt
echo d/c/b > d/c/b.txt
yes n | cp -i -r c d
cp: overwrite ‘d/c/a.txt’? cp: overwrite ‘d/c/b.txt’?
yes n$'\n' | cp -i -r c d
cp: overwrite ‘d/c/a.txt’? cp: overwrite ‘d/c/b.txt’?

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]