12-04-2017
Quote:
Originally Posted by
RudiC
EDIT: With your "here documents" (the data between EOF and EOF), the remote system will try to execute the lines as commands
For a HERE document written in the OP's way, wouldn't the
EOF have to be in the leftmost column?
This User Gave Thanks to rovf For This Post:
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello everyone...im having this problem with unexpected EOF with line 85 which is..i cant see whats wrong with it..can any1 plz help me out.
read -p "$p1 please enter the number of tries you wish to have:" lifeline
function main()
{
guessnum=0
read -p "Please... (6 Replies)
Discussion started by: Freakhan
6 Replies
2. Shell Programming and Scripting
Hello attempting to redirect out to create a startup script in solaris. The steps are working but the $1 entry is being left out. syntax below and content of output file below.
cat > S99build << EOF
> #!/bin/bash
> case $1 in
> 'start')
> /usr/os-buildsol.sh
>
> ;;
> esac
> exit 0
>... (3 Replies)
Discussion started by: juanb25
3 Replies
3. Shell Programming and Scripting
sed 's|^xyz.abc *= *.*|xyz.abc=60|' /test/myFile.properties > /test/myFile.properties1
myFile.properties has the last line as xyz.abc=23 does not end with newline.
When I run this command the last line is truncated if there is no newline character at EOF. Looking for an alternative here. (1 Reply)
Discussion started by: sunn_hps
1 Replies
4. Shell Programming and Scripting
Hi guys,
I have some echo scripts and awk scripts like these:
echo "some text" > output1
.
.
awk '{....}{print}' input > output2Both output1 and output2 are saved with unix END Of Line, then,
is there an option to include within echo command and awk command to save the output as DOS END Of... (3 Replies)
Discussion started by: Ophiuchus
3 Replies
5. Shell Programming and Scripting
I have a script:
#!/bin/ksh
runmqsc CERN.PROD <<EOF
dis chs(to.*)
end
EOF
which gives me the output as:
1 : dis chs(to.*)
AMQ8417: Display Channel Status details.
CHANNEL(TO.CGPRODAPP2) CHLTYPE(CLUSRCVR)
CONNAME(10.60.16.50) CURRENT
... (5 Replies)
Discussion started by: Daniel Gate
5 Replies
6. Shell Programming and Scripting
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Discussion started by: aix_admin_007
4 Replies
7. Shell Programming and Scripting
I would like to redirect output of command line in for loop as $line.
Output should be processed as line but instead it throw whole output.
Could somebody help me on how to redirect output of command line and process it line by line without sending output to any file.
below is my code ... (1 Reply)
Discussion started by: tapia
1 Replies
8. Shell Programming and Scripting
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
9. Shell Programming and Scripting
need to login 4 systems to check whether the systems are accessible or not using rlogin command,after each login i will exit.After issuing the command rlogin abc if it is not responding i will get a message of "connection timed out" . So i want to automate this task .so i tried like below :
EX:... (1 Reply)
Discussion started by: charanarjun
1 Replies
LEARN ABOUT NETBSD
rlogin
RLOGIN(1) BSD General Commands Manual RLOGIN(1)
NAME
rlogin -- remote login
SYNOPSIS
rlogin [-468Ed] [-e char] [-l username] [-p port] host
rlogin [-468Ed] [-e char] [-p port] username@host
DESCRIPTION
rlogin starts a terminal session on a remote host host.
rlogin first attempts to use the standard Berkeley rhosts authorization mechanism. The options are as follows:
-4 Use IPv4 addresses only.
-6 Use IPv6 addresses only.
-8 The -8 option allows an eight-bit input data path at all times; otherwise parity bits are stripped except when the remote
side's stop and start characters are other than '^S/^Q'.
-E The -E option stops any character from being recognized as an escape character. When used with the -8 option, this provides a
completely transparent connection.
-d The -d option turns on socket debugging (see setsockopt(2)) on the TCP sockets used for communication with the remote host.
-e char The -e option allows user specification of the escape character, which is ``~'' by default. This specification may be as a
literal character, or as an octal value in the form
nn.
-l username the -l option specifies an alternate username for the remote login. If this option is not specified, your local username will
be used.
-p port Uses the given port instead of the one assigned to the service ``login''. May be given either as symbolic name or as number.
A line of the form ``<escape char>.'' disconnects from the remote host. Similarly, the line ``<escape char>^Z'' will suspend the rlogin ses-
sion, and ``<escape char><delayed-suspend char>'' suspends the send portion of the rlogin, but allows output from the remote system. By
default, the tilde (``~'') character is the escape character, and normally control-Y (``^Y'') is the delayed-suspend character.
All echoing takes place at the remote site, so that (except for delays) the rlogin is transparent. Flow control via ^S/^Q and flushing of
input and output on interrupts are handled properly.
ENVIRONMENT
The following environment variable is used by rlogin:
TERM Determines the user's terminal type.
SEE ALSO
rcmd(1), rsh(1), rcmd(3), hosts.equiv(5), rhosts(5), environ(7)
HISTORY
The rlogin command appeared in 4.2BSD.
BUGS
More of the environment should be propagated.
BSD
July 16, 2005 BSD