LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-11-2009, 11:30 PM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 128,336

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



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 05:16 PM
LXer: Getting Error Values From The Middle Of A Pipe Chain In Bash LXer Syndicated Linux News 0 12-20-2007 11:20 AM
LXer: Using Functions in a BASH Prompt LXer Syndicated Linux News 0 06-11-2007 02:31 AM
MySQL Returning very strange Values in PHP Script benrose111488 Programming 2 10-21-2004 11:26 AM
How to use return values from system functions? kpachopoulos Programming 2 07-30-2004 03:09 AM

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

All times are GMT -5. The time now is 06:11 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