This file contains hidden or 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 | |
INPUT=urls.txt | |
while read val | |
do | |
URL=`echo ${val}|awk '{ print $1 }'` | |
wget ${URL} | |
done < ${INPUT} |
This file contains hidden or 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 | |
urls='urls.txt' | |
log='log.txt' | |
while read url; do | |
result=$(wget --server-response --spider --timeout=10 $url 2>&1) | |
echo "$result" >> "$log" | |
done < $urls |
This file contains hidden or 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 | |
> index.html | |
[ -d thumbs ] || mkdir thumbs | |
for f in *.png; do | |
convert $f -strip -thumbnail 200x100 thumbs/$f | |
done | |
find -maxdepth 1 -name \*.png -exec echo "<a href=\"{}\"><img src=\"thumbs/{}\" border=\"0\" style=\"margin:10px;border:1px solid #ccc;\"></a>" \; | sort >> index.html |
This file contains hidden or 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 | |
## define image directory | |
DIR=.build/src/webroot/uploads | |
## define image sizes | |
sizes=(320 640 1280) | |
## imagemagick function | |
## convert $1(image) $2(width) $3(newname) |
This file contains hidden or 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 | |
SRC=/path/to/eml/src | |
DEST=/path/to/eml/dest | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
cd "$SRC" | |
for file in $(find -type f -name "*.eml") | |
do | |
EMAILDATE=$(grep -m 1 "^Date: " < "$file" | sed -e "s/Date://g") | |
y=$(date --date="$EMAILDATE" +%Y) |
This file contains hidden or 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 | |
SRC=/path/to/eml/src | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
cd "$SRC" | |
for file in $(find -type f -name "*.eml" -exec grep -l "BEGIN\ PGP\ MESSAGE" {} \; -print) | |
do | |
gpg --decrypt --batch --no-tty --output "$(echo $file|sed 's/\.[^.]*$//').decrypted.eml" "$file" | |
done | |
IFS=$SAVEIFS |