skip to main
|
skip to sidebar
Matt McClure: Notes
Reminders to myself.
Saturday, October 3, 2009
Determine if a Bash script was Executed or Sourced
[ "$0" == "$BASH_SOURCE" ] && echo 'executed' || echo 'sourced'
Determine if a Bash script was Executed or Sourced
[ "$0" == "$BASH_SOURCE" ] && echo 'executed' || echo 'sourced'
View the entire comment thread.
blog comments powered by
Disqus
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
About Me
Matt McClure
View my complete profile
AddThis
Followers
Blog Archive
►
2011
(1)
►
January
(1)
►
2010
(4)
►
August
(1)
►
June
(1)
►
April
(1)
►
February
(1)
▼
2009
(22)
►
December
(6)
►
November
(3)
▼
October
(2)
Return an Array from a Bash Function
Determine if a Bash script was Executed or Sourced
►
September
(9)
►
August
(2)