Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- current=$(cd $(dirname $0) && pwd)
- filearray=(".bashrc" ".bash_profile" ".bash_history" "index.html")
- for item in ${filearray[@]}; do
- if [ -e $HOME/$item ]; then
- echo "$item found"
- filepath=$HOME/$item
- copy=cp $filepath $current
- else
- echo "$item Not found"
- fi
- done
- filearray=(".bashrc" ".bash_profile" ".bash_history" "index.html")
- if [ -e $HOME/$item ]; then
- echo "$item found"
- filepath=$HOME/$item
- cp $filepath "$current"
- else
Add Comment
Please, Sign In to add comment