Yes, $() is nice because of vi % support and nesting without escapes. But you can also say eval or `cmd` or "echo 'cmd' | ksh". Sometimes it is good to be in the same ksh instance. Eval does an extra pass of command line interpretation:
$#=0 so $0 is -ksh
I have an application which has a lot of cout & cerr statements.
This application also opens a log file (for eg a.log).
When this application is run from the inittab file as follows
/bin/sh -c " . /etc/timezone; exec /test"
all the cout & cerr statements are printed in the log file... (1 Reply)
When I run a third parties program from the command line (this program basically list's a whole load of stuff) and write the output to a file it splits the output, i.e. in the middle of the file appears the exit command.
If I don't redirect the output and write it to tty then the output is... (3 Replies)
Hello,
Is is possible to redirect stdout to a file as well as to the console/screen or display in ksh.
any thoughts suggestions/input is appreciated. Thanks. (2 Replies)
Hi, trying to store a comand involving a redirection in a variable and then run this variable. But the redirection gets lost.
Ex:
#!ksh
MYCMD="ls -l > dirlist.txt"
$MYCMD
This runs the command but displays the result in the terminal instead of redirecting it to the text file.
Can... (4 Replies)
Hi All,
How do I provide the output of a command to another command which is waiting for an input from the user ?
Ex : I need to login to a device via telnet. In the script, initially I use the "read" command to get the IP Address, Username and Password of the device from the user. Now,... (1 Reply)
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Is it possible to read from the screen or standard output? If so, may I know how I can do this?
For example, I have an application running which prints out the following on the screen:
Starting tools from .image-tools...
imagecontrol_1: SECS/GEM-capable version is running
done
cindy@pgunix... (2 Replies)
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Bit of a strange one.
Have a script called rapidclone_test.sh which calls Oracle rapidclone using su -c as an oracle osuser. However, if I control+c out to the calling shell anything entered is not displayed on the terminal. Any command executes successfully though.
Why is the standard... (1 Reply)
I am not able to run basic commands on my centos 7 server. The PATH variable looks correct I think. I have not seen this before and not sure what to do next. Thank you :).
# cd /usr/bin
# ls
bash: ls: command not found...
Similar command is: 'lz'
nano ~/.bashrc
bash: nano: command not... (6 Replies)