bash 1356

  1. Getting the source directory of a Bash script from within
  2. How do I tell if a regular file does not exist in Bash?
  3. How to concatenate string variables in Bash?
  4. In the shell, what does “ 2>&1 ” mean?
  5. String contains in Bash
  6. Extract filename and extension in Bash
  7. Check if a program exists from a Bash script
  8. How do I split a string on a delimiter in Bash?
  9. Echo newline in Bash prints literal \n
  10. How to count all the lines of code in a directory recursively?
  11. How do I parse command line arguments in Bash?
  12. How do I reload .bashrc without logging out and back in?
  13. How can I redirect and append both stdout and stderr to a file with Bash?
  14. How do I prompt for Yes/No/Cancel input in a Linux shell script?
  15. How to change the output color of echo in Linux
  16. How do I iterate over a range of numbers defined by variables in Bash?
  17. How to set a variable to the output from a command in Bash?
  18. How to check if a variable is set in Bash?
  19. How to output MySQL query results in CSV format?
  20. Converting string to lower case in Bash
  21. Looping through the content of a file in Bash
  22. Setting environment variables in OS X?
  23. Difference between sh and bash
  24. Check existence of input argument in a Bash shell script
  25. Make a Bash alias that takes a parameter?
  26. Loop through an array of strings in Bash?
  27. How to pipe stderr, and not stdout?
  28. echo that outputs to stderr
  29. How to escape single quotes within single quoted strings?
  30. Pipe to/from the clipboard
  31. How to reload .bash_profile from the command line?
  32. How to count lines in a document?
  33. How can I exclude all “permission denied” messages from “find”?
  34. How to iterate over arguments in a Bash script
  35. Defining a variable with or without export
  36. YYYY-MM-DD format date in shell script
  37. Specify private SSH-key to use when executing shell command with or without Ruby?
  38. Listing only directories using ls in bash: An examination
  39. Redirect all output to file
  40. How to trim whitespace from a Bash variable?
  41. What are the special dollar sign shell variables?
  42. What is the preferred Bash shebang?
  43. Passing parameters to a Bash function
  44. Get current directory name (without full path) in a Bash script
  45. How to declare and use boolean variables in shell script?
  46. How to redirect output to a file and stdout
  47. Why is whitespace sometimes needed around metacharacters?
  48. How to use double or single brackets, parentheses, curly braces
  49. Count number of lines in a git repository
  50. How do I remove all .pyc files from a project?