Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. - id: 16508837,
  2. subject: Linux,
  3. subsubject: bash,
  4. type: explain,
  5. difficulty: easy,
  6. prompt: |
  7. Explain what the following bash command does:
  8. ```
  9. mkdir -p foo/goo
  10. ```
  11. answer: |
  12. If the foo directory does not exist, it will create it as well as a subdirectory called goo.
  13. If the foo directory exists but the goo subdirectory does not exist, it will create the goo subdirectory.
  14. If both already exist, it will do nothing.
  15. - id: 17041667
  16. subject: Linux
  17. subsubject: bash
  18. type: explain
  19. difficulty: easy
  20. prompt: |
  21. Explain what the following bash command does:
  22. ```
  23. n=`cat foo | wc -l`
  24. ```
  25. answer:
  26. It counts the number of lines in the file foo and assigns the value to a variable named n.
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement