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/bash | |
while IFS=, read -r from to | |
do | |
echo copying from $from to $to | |
cp -vufr "$from" "$to" 2>> ~/cperrors.txt | |
done <<EOF | |
/home/myuser/important_files/,/media/myuser/externalHD/backup/important_files | |
/home/myuser/another_dir/,/media/myuser/externalHD/backup/another_dir | |
EOF |
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/bash | |
open_browser () { | |
URL=$1 | |
[[ -x $BROWSER ]] && exec "$BROWSER" "$URL" | |
path=$(which xdg-open || which gnome-open) && exec "$path" "$URL" | |
echo "Can't find browser" | |
} | |
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
#!/usr/bin/python | |
"""Usage: | |
X.py < X.in > X.out | |
""" | |
################################################################################ | |
# util functions | |
logging = False |
NewerOlder