Sponsor for PC Pals Forum

Author Topic: Understanding Functions in Bash  (Read 2279 times)

Offline sam

  • Administrator
  • *****
  • Posts: 19402
Understanding Functions in Bash
« on: July 06, 2011, 07:50 »
Quote
Because the function is executed in the context of the same shell, it does not create a new child process, this makes functions faster as they access the information in RAM. This also will save on resources as you use functions.

"Functions are a script within a script which can be defined by the user and stored in memory, allowing you to reuse the function repeatedly. This also provides a modular aspect that allows you to debug one function at a time be disabling functions.

http://bashshell.net/shell-scripts/understanding-functions
- sam | @starrydude --



Offline davy51

  • Loyal Member
  • *****
  • Posts: 1574
Re: Understanding Functions in Bash
« Reply #1 on: July 06, 2011, 15:51 »
i didnt know it worked that way

I had to search  for bash commands so I could just copy and paste but didnt know how they worked

Bash commands

http://is.gd/yEqUY2
Dave

Don't walk behind me, I may not lead. Don't walk in front of me, I may not follow. Just walk beside me and be my friend

Albert Camus

Offline sam

  • Administrator
  • *****
  • Posts: 19402
Re: Understanding Functions in Bash
« Reply #2 on: July 06, 2011, 16:57 »
I love bash
- sam | @starrydude --




Show unread posts since last visit.
Sponsor for PC Pals Forum