LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-02-2009, 08:36 PM   #1
Al Effendi
LQ Newbie
 
Registered: Dec 2003
Posts: 8

Rep: Reputation: 0
system()


Hi,

Thanks in advance

using knoppix 5.2

myscript
tried foll.

cmd="ls -l"
system($cmd)

cmd = "ls -l" #with spaces
system($cmd)

$cmd="ls -l"
system($cmd)

cmd="ls -l"
system(cmd)

cmd="ls -l"
system(cmd)

i.e all poss. permutations. also tried pwd other cmnds.
errors for all

Appreciate help

thanks

al
 
Old 03-02-2009, 08:51 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,111

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
first of all what language are you using?
if you are using simple shell scripting then

cmd='ls -l'
$cmd

should work
 
Old 03-02-2009, 09:02 PM   #3
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 257

Rep: Reputation: 53
What frieza said.
system() is a c language library function for executing shell commands.
See "man system"
 
  


Reply

Tags
knoppix


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
An error Occurred during the file system check. Dropping you to shell; the system wil aneikei Linux - Newbie 3 02-11-2010 08:38 PM
Installing LILO from host system to hdb to boot as hda in target system A7G1-6 Linux - Hardware 2 07-25-2009 11:37 AM
windows server 2003 as a host system for LINUX guest system VPS h@foorsa.biz Linux - General 2 09-22-2008 07:17 AM
My grub is not loading on dual operating system with windows Xp Pro causing my system marlene tack Linux - Newbie 2 03-17-2008 08:54 AM
KDE sound system doesn't play system notifications in SUSE with OSS driver mike1111 Linux - Software 0 07-17-2006 01:00 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration