Sponsored Content
Full Discussion: Whats the meaning
Top Forums Shell Programming and Scripting Whats the meaning Post 102167 by gauravgoel on Thursday 16th of March 2006 05:52:04 AM
Old 03-16-2006
This is my interpretation and very much open to correction,

this is finding the sum of a variable db_name and 2. And after this redirecting the output to dev/null.
2>&1 means if some error occurs then redirect the output to the same location as to which the normal output is redirected.

Gaurav
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Whats does this mean

Found this piece of code written in ksh. I have no ideas what do the stuff like ${SRF##*\.} do. SUFFIX=${SRF##*\.} if ; then SUFFIX="" fi I have encountered similar expressions in other programs also. Any pointers on where to learn more about these... (1 Reply)
Discussion started by: jyotipg
1 Replies

2. Post Here to Contact Site Administrators and Moderators

Whats the go?

woofie, Your posts are being deleted because your use of profanity. I am close to changing your status to read only. In fact, if you argue with the mods again, I will ban you from these boards. Neo (1 Reply)
Discussion started by: Neo
1 Replies

3. What is on Your Mind?

Whats Behind Your Name?

Looking at the member list, there are alot of interesting names, some unique, some bizarre, and some that are just plain. How did you come by your name? Why did you choose your label? Me? Well, I wish I could change mine. I chose Google because thats how I stumbled upon this site. I wasn't sure... (66 Replies)
Discussion started by: google
66 Replies

4. Shell Programming and Scripting

mail..whats this?

Can anyone explain meaning of this? It takes a lot of time to display mail when i type "mail" on prompt. -------------------------------------------------------- mail: Too many letters, overflowing letters concatenated -------------------------------------------------------- Regards... (1 Reply)
Discussion started by: abhijeetkul
1 Replies

5. Shell Programming and Scripting

Whats the meaning of this code

Hi all, I am unable interpret this code ......... nohup $OPSSHLPATH/mkt_sas_load_cic.sh $db_name $process_id $loc_mm > $OPSLSTPATH/mkt_sas_load_cic.out & Thanks ....In advance (7 Replies)
Discussion started by: dhananjaysk
7 Replies

6. Shell Programming and Scripting

tell me whats wrong with this

#! /bin/bash USAGE=" | ] if then echo "$USAGE" exit 1 fi while getopts lb: OPTION do case $(OPTION)in a) echo Hi there! exit 2;; b) echo hello o) OARG=$OPTARG;; \?)echo "$USAGE" ;; exit 2;; esac done shift `expr... (1 Reply)
Discussion started by: nadman123
1 Replies

7. Shell Programming and Scripting

whats this NAME=${0##*/}

hi all, i found NAME=${0##*/} in a script. i given this coomand in my unix box(presently in ksh). echo ${0##*/} it returned ksh. the purpose of the above is to return the shell name or more than that. do you have any more information like this, please share with me. one more query... (7 Replies)
Discussion started by: Arunprasad
7 Replies

8. Shell Programming and Scripting

##*_ - whats this?

Hi all, could you please tell me whats this stands ##*_ 0##*/ i knew this alone if some more is there please tell me that also. (3 Replies)
Discussion started by: Arunprasad
3 Replies

9. Shell Programming and Scripting

Whats the meaning of set -e inside the script

Hi, I would like to ask about the meaning or purpose of set -e in the script bash, Does it mean if a wrong command in the script it will close or exit the script without continuation thats what happen if i set it in the terminal. Thanks in advance (3 Replies)
Discussion started by: jao_madn
3 Replies
DAEMON(3)						     Linux Programmer's Manual							 DAEMON(3)

NAME
daemon - run in the background SYNOPSIS
#include <unistd.h> int daemon(int nochdir, int noclose); DESCRIPTION
The daemon() function is for programs wishing to detach themselves from the controlling terminal and run in the background as system dae- mons. Unless the argument nochdir is non-zero, daemon() changes the current working directory to the root ("/"). Unless the argument noclose is non-zero, daemon() will redirect standard input, standard output and standard error to /dev/null. RETURN VALUE
(This function forks, and if the fork() succeeds, the father does _exit(0), so that further errors are seen by the child only.) On success zero will be returned. If an error occurs, daemon() returns -1 and sets the global variable errno to any of the errors specified for the library functions fork(2) and setsid(2). SEE ALSO
fork(2), setsid(2) NOTES
The glibc implementation can also return -1 when /dev/null exists but is not a character device with the expected major and minor numbers. In this case errno need not be set. HISTORY
The daemon() function first appeared in BSD4.4. BSD MANPAGE
1993-06-09 DAEMON(3)
All times are GMT -4. The time now is 06:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy