charmdream
Programmer
As title.
The shell command may include its arguments.
And can I use pipe-command(|) in the command?
thanks
The shell command may include its arguments.
And can I use pipe-command(|) in the command?
thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
exec ls -l > ls-output.txt
set result [exec ls -l]
set num [sort < /etc/password | uniq | wc -l]
set list [exec du /]
exec du / > du-output.txt &
set fid [open "| myprog" r]
while {[gets $fid line] != -1} {
# gets returns -1 if it encounters the
# end of output from the program.
# If it returns > -1, then we've read
# a line of output and the characters
# are stored in the variable "line".
# Process the line read as desired...
}
# Close our side of the pipe when we're done
close $fid