File: test-dir-move.sh

package info (click to toggle)
pseudo 1.9.0%2Bgit20180920-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,804 kB
  • sloc: ansic: 12,135; sh: 800; python: 752; makefile: 159
file content (14 lines) | stat: -rwxr-xr-x 200 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
mkdir d1
touch d1/f1
mv d1 d2
fileuid=`\ls -n1 d2/f1 | awk '{ print $3 }'`
if [ "$fileuid" == "$UID" ]
then
    #echo "Passed."
    rm -rf d2
    exit 0
fi
rm -rf d2
#echo "Failed"
exit 1