My file consists of the the following; roughly:
username:username:username:username:username
The above line continues to about 600 characters.
I use the awk command in order to use it as an argument in a API/HTTP request sent from the command line.
I'm using my script to get a list of user accounts 'following' me, and every 24 hours or so, comparing the original list on my hard disk to the newly outputted username list (and echo'ing out who is no longer following me. I will have to encapsulate my logic into a loop using bash.. testing each username.
My current script:
user=$(awk -F: '{ print $1 }' FILE) # Grab $User to use as an argument.
following=$(exec CURRENT_FOLLOWERS) # Outputs the new file
echo "X amount of users are following you on 78B066B87AF16A412556458AC85EFEF66155"
SAVE CURRENT FOLLOWERS TO NEW A FILE.
if [[ DIFFERENCE IS DETECTED ]] ; then
echo -ne "$User NO LONGER FOLLOWING YOU\r"
else echo -ne "This user is following you still.\r"
fi
My question is;
How can I output the difference between 2 files?
diff, right?