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
|
|
|
|
|
2023-11-02 09:37:21 +00:00
|
|
|
awk '{print $2}' shell_cmd.sh
|
|
|
|
cp shell_cmd.sh shell_cmd_backup.sh
|
|
|
|
cat shell_cmd_backup.sh
|
|
|
|
rm shell_cmd_backup.sh
|
2023-03-16 03:00:09 +00:00
|
|
|
|
2023-11-02 09:37:21 +00:00
|
|
|
ln -s shell_cmd.sh tesk_cmd_soft_link
|
2023-03-16 03:00:09 +00:00
|
|
|
readlink -f tesk_cmd_soft_link
|
|
|
|
tail -n 1 tesk_cmd_soft_link
|
|
|
|
rm tesk_cmd_soft_link
|
|
|
|
|
2023-11-02 09:37:21 +00:00
|
|
|
ln shell_cmd.sh tesk_cmd_hard_link
|
2023-03-16 03:00:09 +00:00
|
|
|
tail -n 1 tesk_cmd_hard_link
|
|
|
|
unlink tesk_cmd_hard_link
|
|
|
|
|
2023-11-02 09:37:21 +00:00
|
|
|
sed 3q shell_cmd.sh
|
2023-03-16 03:00:09 +00:00
|
|
|
|
2023-11-02 09:37:21 +00:00
|
|
|
find . -name "*shell_cmd*"
|
2023-03-16 03:00:09 +00:00
|
|
|
|
|
|
|
mkdir foo
|
|
|
|
rmdir foo
|
|
|
|
|
2023-12-25 07:27:41 +00:00
|
|
|
echo "Hello world from asterinas" > hello.txt
|
2023-03-16 03:00:09 +00:00
|
|
|
rm hello.txt
|
|
|
|
|
|
|
|
cd ..
|