Guest User

Untitled

a guest
Nov 20th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/bash
  2. current=$(cd $(dirname $0) && pwd)
  3. filearray=(".bashrc" ".bash_profile" ".bash_history" "index.html")
  4.  
  5. for item in ${filearray[@]}; do
  6. if [ -e $HOME/$item ]; then
  7. echo "$item found"
  8. filepath=$HOME/$item
  9. copy=cp $filepath $current
  10. else
  11. echo "$item Not found"
  12. fi
  13. done
  14.  
  15. filearray=(".bashrc" ".bash_profile" ".bash_history" "index.html")
  16.  
  17. if [ -e $HOME/$item ]; then
  18. echo "$item found"
  19. filepath=$HOME/$item
  20. cp $filepath "$current"
  21. else
Add Comment
Please, Sign In to add comment