aboutsummaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-11-25 07:21:47 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-11-25 07:21:47 +0000
commit7af0934c42c1d391aa48f77d119c3c611b08dca5 (patch)
treee3c4b321b130d28af36ff5cf3bdc48771a405ba2 /coreutils/ls.c
parentfefb8e8926bab1fdf397cd7b3a7dac14c225da69 (diff)
downloadbusybox-w32-7af0934c42c1d391aa48f77d119c3c611b08dca5.tar.gz
busybox-w32-7af0934c42c1d391aa48f77d119c3c611b08dca5.tar.bz2
busybox-w32-7af0934c42c1d391aa48f77d119c3c611b08dca5.zip
Hiroshi found another bug. Currently sed's $ triggers at end of every file,
and with multiple files SuSv3 says it should only trigger at the end of the LAST file. The trivial fix I tried first broke if the last file is empty. Fixing this properly required restructuring things to create a file list (actually a FILE * list), and then processing it all in one go. (There's probably a smaller way to do this, merging with append_list perhaps. But let's get the behavior correct first.) Note that editing files in place (-i) needs the _old_ behavior, with $ triggering at the end of each file. Here's a test of all the things this patch fixed. gnu and busybox seds produce the same results with this patch, and different without it. echo -n -e "1one\n1two\n1three" > ../test1 echo -n > ../test2 echo -e "3one\n3two\n3three" > ../test3 sed -n "$ p" ../test1 ../test2 ../test3 sed -n "$ p" ../test1 ../test2 sed -i -n "$ p" ../test1 ../test2 ../test3 git-svn-id: svn://busybox.net/trunk/busybox@9530 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/ls.c')
0 files changed, 0 insertions, 0 deletions