LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 09-12-2009, 12:30 AM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 132,195

Rep: Reputation: 118Reputation: 118
LXer: Returning Values from Bash Functions


Published at LXer:

Bash functions, unlike functions in most programming languages do not allow you to return a value to the caller. When a bash function ends its return value is its status: zero for success, non-zero for failure. To return values, you can set a global variable with the result, or use command substitution, or you can pass in the name of a variable to use as the result variable. The examples below describe these different mechanisms.

Read More...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
awk/nawk returning decimal values? moutaye Linux - General 6 03-25-2008 06:16 PM
LXer: Getting Error Values From The Middle Of A Pipe Chain In Bash LXer Syndicated Linux News 0 12-20-2007 12:20 PM
LXer: Using Functions in a BASH Prompt LXer Syndicated Linux News 0 06-11-2007 03:31 AM
MySQL Returning very strange Values in PHP Script benrose111488 Programming 2 10-21-2004 12:26 PM
How to use return values from system functions? kpachopoulos Programming 2 07-30-2004 04:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 03:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration