asterinas/regression/apps/scripts/test_cmd.sh

38 lines
583 B
Bash
Raw Normal View History

2023-03-16 03:00:09 +00:00
#!/bin/sh
set -e
set -x
2023-07-05 06:08:58 +00:00
SCRIPT_DIR=/regression
2023-03-22 03:52:24 +00:00
cd ${SCRIPT_DIR}
2023-03-16 03:00:09 +00:00
touch hello.txt
mv hello.txt hello_world.txt
rm hello_world.txt
awk '{print $2}' test_cmd.sh
cp test_cmd.sh test_cmd_backup.sh
cat test_cmd_backup.sh
rm test_cmd_backup.sh
ln -s test_cmd.sh tesk_cmd_soft_link
readlink -f tesk_cmd_soft_link
tail -n 1 tesk_cmd_soft_link
rm tesk_cmd_soft_link
ln test_cmd.sh tesk_cmd_hard_link
tail -n 1 tesk_cmd_hard_link
unlink tesk_cmd_hard_link
sed 3q test_cmd.sh
find . -name "*test_cmd*"
mkdir foo
rmdir foo
echo "Hello world from jinux" > hello.txt
rm hello.txt
cd ..