Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts

Tuesday, June 23, 2015

fix locale

fix locale on some python or another script that locale-sensitive
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
 taken from:
http://askubuntu.com/questions/205378/unsupported-locale-setting-fault-by-command-not-found

Saturday, January 31, 2015

sha512sum

to generate recursively:
find . -type f -exec sha512sum {} \; > sha512sum-${PWD##*/}

to check:
sha512sum -c sha512sum-${PWD##*/} | grep -i fail

ps.: "${PWD##*/}" is only the directory name, like: "pwd | rev | cut -d / -f1 | rev"

from:
http://www.shell-fu.org/lister.php?id=850

Thursday, December 04, 2008

tingkah laku expect

ternyata, tingkah laku expect di openbsd lebih bisa diharapken daripada di linux. Ini buktinya, script saya jalan.
-bash-3.2$ more test01.exp
spawn telnet $argv
expect ogin:
send yusuf81\r
expect assword:
send lihatlog\r
expect >
send "ip arp print\r"
expect ]
send q\r
expect >
send quit\r
-bash-3.2$