Advertisement
metalx1000

Including functions from other files and returning values

Jan 19th, 2017
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.22 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. source functions.sh #includes another shell script into this file
  4.  
  5. myFunc #function from functions.sh
  6.  
  7. function myFunc2 {
  8.    echo "This is a string"
  9. }
  10.  
  11. VARIABLE="$(myFunc2)"
  12.  
  13. echo "the var is $VARIABLE"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement