Scripts: gnac init

master
Pierre Neidhardt 2014-03-05 15:59:15 +01:00
parent b65f2564cc
commit b3d9573c48
2 changed files with 13 additions and 25 deletions

13
.scripts/gnac Executable file
View File

@ -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:]]/'

View File

@ -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