Skip to content

Instantly share code, notes, and snippets.

@Amos-li
Created February 24, 2021 08:34
Show Gist options
  • Save Amos-li/b5fa1e2e17fe48bc435cb8c4b7997056 to your computer and use it in GitHub Desktop.
Save Amos-li/b5fa1e2e17fe48bc435cb8c4b7997056 to your computer and use it in GitHub Desktop.
# !/bin/bash
echo "Which option do you want?"
select name in "delete" "to our" "to lyy" "to All" "unzip" "zip" "email"
do
case $name in
"to our")
ls -lh | awk 'NR-4==1 {print $9"\\",$10}'|xargs -J {} mv {} our && ls -lh
;;
"to lyy")
ls -lh | awk 'NR-4==1 {print $9"\\",$10}'|xargs -J {} mv {} tolyy && ls -lh
;;
"to All")
ls -lh | awk 'NR-4==1 {print $9"\\",$10}'|xargs -J {} cp {} tolyy
ls -lh | awk 'NR-4==1 {print $9"\\",$10}'|xargs -J {} cp {} our && ls -lh
;;
"delete")
ls -lh | awk 'NR-4==1 {print $9"\\",$10}'|xargs rm && ls -lh
;;
"zip")
zip -r our.zip our/
zip -r tolyy.zip tolyy/
break
;;
*)
echo "输入错误"
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment