Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/tcsh
- #Kamil Milik grupa 2
- set fullName=`getent passwd "$USER" | cut -d: -f5 | cut -d, -f1`
- set loginInfo=`whoami`
- alias show_help echo "HELP: The program provides login and first and last name. The author of the program: Kamil Milik"
- foreach param ($*)
- if ( "$param" == "-h" || "$param" == "--help" ) then
- show_help
- exit 0
- endif
- end
- foreach param ($*)
- if ( "$param" == "-q" || "$param" == "--quiet" ) then
- exit 0
- endif
- end
- foreach param ($*)
- if( "$param" =~ -* ) then
- echo "Incorrect option $param"
- show_help
- exit 1
- endif
- end
- echo "Login: $loginInfo"
- echo "User name: $fullName"
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement