summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-10-31 08:31:30 +0000
committerJim Meyering <jim@meyering.net>2000-10-31 08:31:30 +0000
commitae53a3e4dad27f6b0f6946e18c754aec4eccdecb (patch)
tree068035486f17df84c79a8d6389acea22455653ee /tests
parenta5385f0a5f7e442bc952d03ab3fc5a77753c5926 (diff)
downloadcoreutils-ae53a3e4dad27f6b0f6946e18c754aec4eccdecb.tar.xz
use backticks and sed instead of set and shift
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cp/cp-parents6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index de14ff914..313ead5db 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -41,8 +41,8 @@ test -d d/a/b/c || fail=1
# Check that re_protect works.
chmod go=w d/a
cp -a --parents d/a/b/c e || fail=1
-set _ `ls -ld e/d`; shift; case $1 in drwxr-xr-x);; *) fail=1;; esac
-set _ `ls -ld e/d/a`; shift; case $1 in drwx-w--w-);; *) fail=1;; esac
-set _ `ls -ld e/d/a/b/c`; shift; case $1 in drwxr-xr-x);; *) fail=1;; esac
+p=`ls -ld e/d|sed 's/ .*//'`; case $p in drwxr-xr-x);; *) fail=1;; esac
+p=`ls -ld e/d/a|sed 's/ .*//'`; case $p in drwx-w--w-);; *) fail=1;; esac
+p=`ls -ld e/d/a/b/c|sed 's/ .*//'`; case $p in drwxr-xr-x);; *) fail=1;; esac
(exit $fail); exit