sed 's/?/&^n/g' or something like that ? 2013/3/10 Peng Yu <[email protected]>
> On Sun, Mar 10, 2013 at 5:06 AM, CoreUtils subscribtion for PLC > <[email protected]> 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 >
