shell 1021

  1. Calling an external command in Python
  2. Check if a directory exists in a shell script
  3. How to concatenate string variables in Bash
  4. How to scp a folder from remote to local?
  5. In the shell, what does “ 2>&1 ” mean?


  6. Check if a program exists from a Bash script
  7. How do I split a string on a delimiter in Bash?
  8. How to mkdir only if a dir does not already exist?
  9. Delete lines in a text file that contain a specific string
  10. How to count all the lines of code in a directory recursively?
  11. How can I recursively find all files in current and subfolders based on wildcard matching?
  12. How do I prompt for Yes/No/Cancel input in a Linux shell script?
  13. How to set a variable to the output of a command in Bash?
  14. How to check if a variable is set in Bash?
  15. How do I iterate over a range of numbers defined by variables in Bash?
  16. How to use SSH to run a shell script on a remote machine?
  17. Converting string to lower case in Bash
  18. Loop through an array of strings in Bash?
  19. Calling shell commands from Ruby
  20. Difference between sh and bash
  21. Check existence of input argument in a Bash shell script
  22. How to exclude a directory in find . command
  23. Why do people write the #!/usr/bin/env python shebang on the first line of a Python script?
  24. How do I put an already-running process under nohup?
  25. YYYY-MM-DD format date in shell script
  26. How to reload .bash_profile from the command line?
  27. Shell command to sum integers, one per line?
  28. Defining a variable with or without export
  29. Specify private SSH-key to use when executing shell command?
  30. Use grep --exclude/--include syntax to not grep through certain files
  31. How to declare and use boolean variables in shell script?
  32. Get current directory name (without full path) in a Bash script
  33. Why doesn't “cd” work in a shell script?
  34. Running shell command from Python and capturing the output
  35. In a shell script: echo shell commands as they are executed
  36. Count number of lines in a git repository
  37. Shell command to tar directory excluding certain files/folders
  38. How to 'grep' a continuous stream?
  39. Why is whitespace sometimes needed around metacharacters?
  40. Given two directory trees, how can I find out which files differ?
  41. Redirect stderr and stdout in Bash
  42. Add line break to 'git commit -m' from the command line
  43. How can I write a heredoc to a file in Bash script?
  44. Check if pull needed in Git
  45. sed command find and replace in file and overwrite file doesn't work, it empties the file
  46. Extract substring in Bash
  47. How can I reverse the order of lines in a file?
  48. Should I put #! (shebang) in Python scripts, and what form should it take?
  49. How to run a shell script on a Unix console or Mac terminal?
  50. How to determine the current shell I'm working on?