LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2004, 03:02 AM   #1
khucinx
LQ Newbie
 
Registered: May 2004
Posts: 23

Rep: Reputation: 15
Question execute shell command inside of tcl file


i have shell script in .tcl(include snack package) like this:

#!/bin/sh
# the next line restarts using wish \
exec wish8.3 "$0" "$@"

ls

package require snack

snack::sound snd

snd read ex1.wav
snd write ex1.au

exit

there is something error whe i execute them :
Error in startup script: invalid command name "ls"
while executing
"ls"
(file "./coba.tcl" line 4)

why?
 
Old 07-05-2004, 01:29 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Replace ls with eg.
puts [exec "ls"]
 
  


Reply


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
execute shell command inside of c code? khucinx Programming 6 10-26-2010 09:30 PM
Problem executing mv command inside shell script pablogosse Linux - General 7 12-16-2009 12:21 PM
PHP can't execute shell command ! rome Programming 1 11-15-2005 09:12 AM
very new to C, how to execute command inside C? neurotic85 Programming 5 09-05-2005 08:19 AM
run shell command inside of c code? khucinx Programming 2 05-17-2004 10:04 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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