Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. # FOR LOOP
  2. # for <var> in $(<command>); do <any command> $<var>; done
  3. # Example -
  4. for x in $(git status | grep --only-matching 'patc.*'); do echo $x; done
  5.  
  6. # FIND COMMAND
  7. # find <path> -iname '<search regex>'
  8. # Example -
  9. find . -iname '*.nupkg'
  10.  
  11. # RUN WITH ENV VAR
  12. # Run a command with some environment
  13. # <var>=<value> bash -c '<cmd> $<var>'
  14. # Example -
  15. hello=test bash -c 'echo $hello'
  16.  
  17. # GREP Example
  18. history | grep --only-matching 'git.*' | sort --unique
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement