Advertisement
Guest User

Untitled

a guest
Jun 15th, 2015
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/bin/sh
  2. # Displays a list of files in current directory and prompt for which
  3. # file to edit
  4.  
  5. # Set the prompt for the select command
  6. PS3="Type a number or 'q' to quit: "
  7.  
  8. # Create a list of files to display
  9. fileList=$(find ~/.i3 -name config* -type f)
  10.  
  11. # Show a menu and ask for input. If the user entered a valid choice,
  12. # then invoke the editor on that file
  13. select fileName in $fileList; do
  14. if [ -n "$fileName" ]; then
  15. cp ${fileName} ~/.i3/config
  16. fi
  17. break
  18. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement