The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mailx Issue with -r flag superdelic UNIX for Dummies Questions & Answers 1 01-22-2008 11:06 AM
Shell to run one after another checking any flag or file konark Shell Programming and Scripting 3 12-28-2007 03:27 PM
Retaining value in var for flag. videsh77 Shell Programming and Scripting 4 05-31-2005 11:44 PM
Bad Audit Flag wobitu HP-UX 1 09-29-2004 06:32 AM
pwd: A specified flag is not valid for this command. Paxton UNIX for Dummies Questions & Answers 2 08-29-2003 01:56 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-16-2008
alexcol alexcol is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 31
Smile the flag -c in sh command

I need your help please.
In a production system, i've seen many running process as follow:

sh -c ./pathname/shellname

what exactly the flag option -c is used for?
ive tried to look at the man page, but it doesnt say much.
ill appreciate yor help. Thanks
  #2 (permalink)  
Old 07-16-2008
FunibonE FunibonE is offline
Registered User
  
 

Join Date: Jul 2008
Location: Silicon Forest
Posts: 16
User Commands sh(1)

The following options specify the resource whose limits
are to be printed or set. If no option is specified, the
file size limit is printed or set.

-c maximum core file size (in 512-byte blocks)
  #3 (permalink)  
Old 07-16-2008
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,184
From a Bourne Shell man referring to the sh command line:

-c string If the -c option is present then commands are read from
string.
  #4 (permalink)  
Old 07-16-2008
alexcol alexcol is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 31
Smile sh -c ./pathname/shellname

Thanks for your reply, but im sorry, i wanted to know exactly what is the difference, advantage or disadvantage if i didnt type this flag instead ?
  #5 (permalink)  
Old 07-21-2008
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,184
When there is only one argument on the command line to sh and the argument does not contain space characters, it makes no difference.
The arguments are named (e.g. -c) rather than positional.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0