diff options
Diffstat (limited to 'bash.html.markdown')
| -rw-r--r-- | bash.html.markdown | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/bash.html.markdown b/bash.html.markdown index 3f3e49eb..cb805da7 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -25,7 +25,7 @@ Nearly all examples below can be a part of a shell script or executed directly i  [Read more here.](http://www.gnu.org/software/bash/manual/bashref.html)  ```bash -#!/bin/bash +#!/usr/bin/env bash  # First line of the script is shebang which tells the system how to execute  # the script: http://en.wikipedia.org/wiki/Shebang_(Unix)  # As you already figured, comments start with #. Shebang is also a comment. @@ -74,7 +74,7 @@ echo ${Variable/Some/A} # => A string  # Substring from a variable  Length=7 -echo ${Variable:0:Length} # => Some st +echo ${Variable:0:$Length} # => Some st  # This will return only the first 7 characters of the value  # Default value for variable | 
