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="$1" | |
if [[ `which faup; echo $?` == 1 ]] | |
then | |
echo " [x] Error: faup not installed! (git clone https://github.com/stricaud/faup.git)" | |
exit 3 | |
fi | |
if [ -z "$INPUT" ] | |
then | |
echo " [x] Error: host missing!" |
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 | |
FILENAME="$1" | |
OLDCOMMENT="`mdls -r -nullMarker "" -n kMDItemFinderComment \"$FILENAME\"`" | |
echo "Old comment: $OLDCOMMENT" | |
while read LINE | |
do | |
COMMENT="$OLDCOMMENT $LINE" | |
done | |
echo "Updated comment: $COMMENT" | |
PATH=`pwd` |
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 -x | |
FILENAME="$1" | |
echo "Collecting attributes for $FILENAME" &&\ | |
HASHMD5=`md5 "$1" | cut -d"=" -s -f2|tr -d " "` &&\ | |
echo -e "MD5\t\t$HASHMD5" &&\ | |
HASHSHA1=`shasum "$1" | cut -d" " -f 1` &&\ | |
echo -e "SHA1\t\t$HASHSHA1" &&\ | |
SHA2ALGOS="224 256 384 512" &&\ | |
HASHSHA2_224=`shasum -a 224 "$1"|cut -d" " -f1` &&\ | |
echo -e "SHA2-224\t$HASHSHA2_224" &&\ |