Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. echo "Do you want to execute the program? (y/n):"
  2. read input
  3. if [ $input == "n" ];
  4. then
  5. exit
  6. fi
  7.  
  8. cd ~/Desktop
  9. mkdir exam
  10. mkdir exam/dir{1..3}
  11. cd exam/
  12. ls -a
  13. touch dir2/file{1,2}
  14. cd dir2
  15. cp file1 ../dir3/file1_copy
  16. mv file1 file1_renamed
  17. mv file2 ../dir1/
  18. cd ..
  19. rm dir2/file1_renamed
  20. rmdir dir2
  21. rm -r dir3
  22. cat >> dir1/file1
  23. echo "This is a test" >> dir1/file1
  24. cat > dir1/file3
  25. echo "Goodbye" >> dir1/file3
  26. cd dir1
  27. cat file1 file3 > ../file_conc
  28. cd ..
  29. ln -s ~/Desktop/ exam_link
  30. ls -lR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement