Advertisement
v1ral_ITS

testing shell script to find all video libraries in computer shell script

Sep 1st, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Append (>>) following to end of each script tracked.
  4.  
  5. whoami>> $SAVE_FILE       # User invoking the script.
  6. echo $0>> $SAVE_FILE      # Script name.
  7. date>> $SAVE_FILE         # Date and time.
  8. echo>> $SAVE_FILE         # Blank line as seperator
  9.  
  10. # Of course, SAVE_FILE must be defined and exported as environmental variable in ~/.bashrc or ~/.zshrc etc..
  11. #+ (something like ~/.scripts-run)
  12.  
  13. ####
  14. # TRACKED_SCRIPT
  15. ####
  16.  
  17. FILES="/media/v1ral/XVIDS/* /home/v1ral/xvids/*"
  18. for f in $FILES
  19. do
  20.     if [ -f ${f}.mp4 ]
  21.     then
  22.         echo "Adding $f File!"
  23.         continue
  24.     fi
  25.     # START
  26.     mpv --shuffle $f
  27. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement