diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-05-04 06:39:46 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-05-04 06:39:46 +0000 |
commit | 7019cb655fe843136a868962ab5d8e799ee387a9 (patch) | |
tree | 27c8d7a224ffbda33a9d15969b066f285e51c440 /Test | |
parent | 02d4869c4311bc920e94f1b5ff87d02683d603fc (diff) | |
download | zsh-7019cb655fe843136a868962ab5d8e799ee387a9.tar.gz zsh-7019cb655fe843136a868962ab5d8e799ee387a9.tar.xz zsh-7019cb655fe843136a868962ab5d8e799ee387a9.zip |
11137: Test/07cond.ztst: detect block device file using find.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/07cond.ztst | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Test/07cond.ztst b/Test/07cond.ztst index 1d1ba6679..827f2744e 100644 --- a/Test/07cond.ztst +++ b/Test/07cond.ztst @@ -27,11 +27,7 @@ 0:-a cond # Find a block special file system. This is a little tricky. - block=$(df / | awk ' - $NF == "/" {print $1} - $1 == "/" && substr($2,0,1) == "(" { - if((l = index($2,")") - 2) < 0) l = length($2) - 1; - print substr($2,2,l)}') && + block=$(find /dev /devices -type b -print 2>/dev/null|head -1) && [[ -b $block && ! -b zerolength ]] 0:-b cond |