Advertisement
joemccray

Linux shell Kung-Fu

Oct 3rd, 2018
913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. # How to check to see if a script is running as root
  2. https://askubuntu.com/questions/15853/how-can-a-script-check-if-its-being-run-as-root
  3.  
  4.  
  5. # How to read from a file
  6. https://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/
  7.  
  8.  
  9. # How to check to see if a directory exists
  10. https://www.cyberciti.biz/tips/find-out-if-directory-exists.html
  11.  
  12. # How to check to see if a file exists
  13. https://www.cyberciti.biz/tips/find-out-if-file-exists-with-conditional-expressions.html
  14.  
  15.  
  16. # Run a script against every file in a directory
  17. https://www.cyberciti.biz/faq/bash-loop-over-file/
  18. https://stackoverflow.com/questions/10523415/bash-script-to-execute-command-on-all-files-in-a-directory
  19.  
  20.  
  21. # Insert values into a database
  22. https://www.linuxquestions.org/questions/programming-9/shell-script-to-insert-value-in-database-666785/
  23.  
  24.  
  25. # Read values from a database
  26. https://www.shellhacks.com/mysql-run-query-bash-script-linux-command-line/
  27.  
  28. # Parse XML file
  29. http://www.humbug.in/2010/parse-simple-xml-files-using-bash-extract-name-value-pairs-and-attributes/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement