Scripts: gnac init
parent
b65f2564cc
commit
b3d9573c48
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "-" ] || [ "$1" = "--help" ]; then
|
||||
cat <<EOF
|
||||
Usage: ${0##*/} [FILES]
|
||||
|
||||
Grep non-ascii characters. If no files are provided, use stdin.
|
||||
|
||||
EOF
|
||||
exit
|
||||
fi
|
||||
|
||||
perl -ne 'chomp; print $_, "\n" if /[[:^ascii:]]/'
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
rawname=${0##*/}
|
||||
rawname=${rawname#p}
|
||||
|
||||
if [ "$1" = "-h" ]; then
|
||||
cat <<EOF
|
||||
Usage: ${0##*/}
|
||||
|
||||
Run `sessionclean' if available and $rawname the system.
|
||||
|
||||
EOF
|
||||
exit
|
||||
fi
|
||||
|
||||
command -v sessionclean >/dev/null 2>&1 && sessionclean
|
||||
|
||||
## Poweroff / Reboot.
|
||||
## If you do not want to get prompted for your password, configure sudo properly.
|
||||
## TODO: use only "sudo halt -p"?
|
||||
sudo $rawname
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
|
||||
else
|
||||
fi
|
Loading…
Reference in New Issue