Created
January 19, 2012 17:08
-
-
Save seraphyn/1641223 to your computer and use it in GitHub Desktop.
Aus dem ~/bin/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
illegal = list('''!"#$%&\'()*+,/:;<=>?@[\\]^_`{|}~ ''') | |
repl = "_" | |
for root,dir,files in os.walk(os.getcwd()): | |
for fi in files: | |
for ill in illegal: | |
if ill in fi: | |
print "found ", os.path.join(root,fi) | |
newname = fi.replace(ill,repl) | |
os.rename( os.path.join(root,fi) , os.path.join(root,newname) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -x /usr/lib/update-notifier/apt-check ]; then | |
/usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;.*$/\!/" | |
elif [ -x /usr/bin/apt-get ]; then | |
/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade | grep ^Inst | wc -l | sed "s/$/\!/" | |
elif [ -x /usr/bin/yum ]; then | |
/usr/bin/yum list updates | grep -c "updates" | sed "s/$/\!/" | |
else | |
echo "?" | |
fi |
Very old, never used, nice to know thanks ツ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
compare debian package detox