04-13-2008
Your use of "echo -n" is what leaves off the final newline from the output. Take out the -n and it should work (if I understand you correctly).
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
i have made a script which makes some analyses on some differnet hosts.
but i have a problem to make this script more quicker ...
i would like to enter more a one hosts in the query
(in my script are this:
Pls enter the Hostname ...
read hostname
for i in $hostname
do
echo... (5 Replies)
Discussion started by: scottl
5 Replies
2. Shell Programming and Scripting
Hi, I am not experienced in shell scripts, I hope someone can give some hint for the following problem
I have html file like this
<html>
<body>
Some stuff
More stuff
<pre>
A
B
</pre>
Still more stuff
And more
<pre>
C
D
</pre>
Additional stuff
</body> (2 Replies)
Discussion started by: ccp
2 Replies
3. AIX
Hi,
Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies
4. AIX
I would like to seek some expertise of all our AIX experts on board.
1) I would like know how to get a return exit code of a command. I found that there are exist code for each and every command run in AIX but I just can't get the return code from my scripts.
A=`cp /home/abc/abc.txt... (7 Replies)
Discussion started by: kwliew999
7 Replies
5. Shell Programming and Scripting
Hi All,
I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by
set EDITOR=vi it does not open a vi editor , rather it do as below.....
/////////////////////////////////////////////////////
$ set... (6 Replies)
Discussion started by: aarora_98
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Probably a real easy one for someone...I need to have a scheduled cp job run from crontab to copy certain files and directories to a shared NFS storage.
The script I have works fine, except I need to exclude certain directories to stop issues with symbolic links, can someone explain... (2 Replies)
Discussion started by: paul.duncalf
2 Replies
7. Shell Programming and Scripting
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
Discussion started by: shashi369
1 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I really wan't to know that how to edit a shell script with out using an editor..
Is there any command? (4 Replies)
Discussion started by: buddhi
4 Replies
9. Shell Programming and Scripting
Hi all,
I am trying to use the Ex editor and its commands in a script - more specifically within an if statement within a while loop.
Here are the basics of the loop:
cat $file1 | while read line
do
grep $line $file2
if ]
then
echo $line > $file2
elseex $file2
/ESI185... (4 Replies)
Discussion started by: luke222010
4 Replies
10. Shell Programming and Scripting
I have an existing shell script that I am trying to modify. I have about 10 lines of info I want to overwrite using text someone emailed to me. I guess what I am trying to do basically is like a copy/paste, but it's not working for me.
I am using Cygwin and vi editor.
I open the script and... (4 Replies)
Discussion started by: kimberlyg2007
4 Replies
win(1) General Commands Manual win(1)
NAME
win - Terminal emulator
SYNOPSIS
win [-v] [-t name] [command [argument ...]] address
OPTIONS
-v If the -v option is present, win prints its version number and date and exits.
-tname If the -t option is present, win uses +name as the final part of the tag name of its window.
DESCRIPTION
win must be able to connect to a running wily(1). win attaches to a window. If the -t option is present, the final part of the tag name
is name. If command is present, the final part of the tag name is +command. Otherwise, the final part of the tag name is +win. The first
part of the tag name is the current working directory.
win runs a program in a child process. The child process is the leader of a process group and is connected to win by a pseudo-terminal.
If command is specified, the child process runs
$SHELL -c 'command argument ...'
otherwise it runs
$SHELL -i
If SHELL is not found in the environment, /bin/sh is used.
TERM=win is placed in the environment of the running program.
Output from the running command appears in the window. The point after the last output from the running command is known as the output
point. Further output from the running command appears just before the output point. The output point is initially at the end of the win-
dow.
Normal wily editing commands work in the window. When a newline, interrupt character, or end-of-file character is created after the output
point, the text between the output point and the last newline, interrupt character, or end-of-file character in the window (inclusive) is
passed to the running program as input.
The interrupt character is control-C and the end-of-file character is control-D. The pseudo-terminal initially is configured so that these
are recognized with their normal meanings.
The B2 commands beginning with the |, <, or > characters or an upper case letter are executed normally by wily. Other B2 are first termi-
nated with a newline, if they are not already, and are then appended to the buffer (and thereafter passed to the running program).
RETURNS
win returns zero if it is able to successfully create the child process, otherwise it returns non-zero.
EXAMPLES
Run a terminal emulator within wily
win
Run FTP within wily
win ftp
Run rlogin within wily
win -t host.domain rlogin -8 host.domain
SEE ALSO
wily(1) Tag(1) Man(1)
BUGS
win doesn't follow changes to the terminal attributes. In particular, there is no way to stop echoing or to change its concept of the
interrupt and eof characters.
rlogin seems to need -8 and, annoyingly, sets echo and onlcr. The latter can be fixed in your .rcrc:
if ( ~ $TERM win ) {
stty -echo -onlcr
}
win doesn't follow changes to the terminal attributes. In particular, there is no way to stop echoing or to change its concept of the
interrupt and eof characters.
WEdestroy messages aren't yet passed by wily. Thus, Del and Delcol can delete the window yet leave win running.
There is a race condition; the user can press newline and then delete text before win has a chance to read it.
AUTHOR
win was originally written by Gary Capell (gary@cs.su.oz.au). Alan Watson (alan@oldp.nmsu.edu) rewrote it and added support for arguments,
pseudo-terminals instead of pipes, and execution of certain B2 commands by wily. The pseudo-terminal support in 9term, written by Matty
Farrow (matty@cs.su.oz.au), was a great help.
1R1.1L1 of 1D1 win(1)