The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
c system call rangaswamy High Level Programming 1 02-19-2008 01:53 PM
how to differentiate system call from library call muru UNIX for Advanced & Expert Users 2 07-19-2007 11:20 PM
Making a system call hardwickj High Level Programming 5 07-06-2006 09:28 PM
wait system call a25khan High Level Programming 2 02-11-2004 11:56 AM
semclt system call ??? abdul High Level Programming 2 09-20-2001 11:24 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-15-2009
hegdeshashi hegdeshashi is offline
Registered User
  
 

Join Date: May 2009
Posts: 28
system call

Hi,

How to write a system calls in a script ?

> cd $HOME
> ls -ltr

thanks in advance..
  #2 (permalink)  
Old 06-15-2009
rakeshawasthi rakeshawasthi is offline
Registered User
  
 

Join Date: Aug 2004
Location: India
Posts: 379
What are you trying to do?
What have you tried?
Where are you stuck?
  #3 (permalink)  
Old 06-15-2009
hegdeshashi hegdeshashi is offline
Registered User
  
 

Join Date: May 2009
Posts: 28
In a script , I wrote
system( "ls -ltr" )

which is giving me the error..
Once I run the script , it has to display all files..
  #4 (permalink)  
Old 06-15-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,912
Which scripting language are you using?
  #5 (permalink)  
Old 06-15-2009
hegdeshashi hegdeshashi is offline
Registered User
  
 

Join Date: May 2009
Posts: 28
shell script
  #6 (permalink)  
Old 06-15-2009
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,661
Quote:
Originally Posted by hegdeshashi View Post
shell script
Which shell script? There are lots of them
  #7 (permalink)  
Old 06-15-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,163
"system" is a C programming language command.

Did you mean:

Code:
#include <stdio.h>
main()
{
system( "ls -1tr" );
}
Sponsored Links
Reply

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:17 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