03-21-2019
I think the problem lies in the escaping of the $ sign when expanding variables in your here document. Just as a rule of thumb: escape it to use a "remote" variable, don't escape it for using local vars. Having local and remote variables with identical names doesn't help debugging nor understanding what's going on...
10 More Discussions You Might Find Interesting
1. Programming
Hello everybody !
I have a first program, called "server" which build 2 FIFO's in this way:
...
#define PERMS 0666
#define FIFO1 "\tmp\cerere"
#define FIFO2 "\tmp\raspuns"
...
mkfifo(FIFO1, PERMS)
mkfifo(FIFO2, PERMS)
...
I want to access these FIFO's in a second separate program,... (1 Reply)
Discussion started by: Ametis1970
1 Replies
2. Shell Programming and Scripting
Hi
I need a script which will remove a path from PATH environment variable. For example
$echo PATH
/usr/local/bin:/usr/bin:test/rmve:/usr/games
$echo rmv
test/rmve
Here I need a shell script which will remove rmv path (test/rmve) from PATH... (9 Replies)
Discussion started by: madhu84
9 Replies
3. Shell Programming and Scripting
Hi,
Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable?
for eg: suppose the PATH is being set as follows
PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4
... (2 Replies)
Discussion started by: royalibrahim
2 Replies
4. Shell Programming and Scripting
Hello Folks,
I want to append a path in user's PATH variable which should be available in current session.
Background
Numerous persons will run a utility.
Aim is to add the absolute path of the utility the first time it runs so that next runs have the PATH in env & users can directly run... (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies
5. Shell Programming and Scripting
Hi I'm trying to select text between two lines, I'm using sed to to this, but I need to pass variables to it. For example
start="BEGIN /home/mavkoup/data"
end="END"
sed -n -e '/${start}/,/${end}/g' doesn't work. I've tried double quotes as well. I think there's a problem with the / in the... (4 Replies)
Discussion started by: mavkoup
4 Replies
6. Shell Programming and Scripting
Hello again :)
Am currently trying to write a function which will delete a record from a file.
The code currently looks as such:
function deleteRecord() {
clear
read -p "Please enter the ID of the record you wish to remove: " strID
... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies
7. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
8. HP-UX
Hello friends,
I need to set PATH variable for all HP-UX users. I tried to implement it using /etc/profile and /etc/sshrc both none of them work.
I don't see sshrc file anywhere.
Please advise!
TIA (4 Replies)
Discussion started by: prvnrk
4 Replies
9. Shell Programming and Scripting
I'm writing python script to get the file-names in the current directory and file sizes .I'm able to get file list and their sizes but unable to pass them through command line. I want to use this script to execute on other directory and pass directory path with file name through command line. Any... (1 Reply)
Discussion started by: etldeveloper
1 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
Hope you're doing well !
I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted.
header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
LEARN ABOUT DEBIAN
netkit-rlogin
RLOGIN(1) BSD General Commands Manual RLOGIN(1)
NAME
rlogin -- remote login
SYNOPSIS
rlogin [-8EKLd] [-e char] [-i identity] [-l username] [-p port] host
DESCRIPTION
Rlogin starts a terminal session on a remote host host.
Rlogin first attempts to use the Kerberos authorization mechanism, described below. If the remote host does not supporting Kerberos the
standard Berkeley rhosts authorization mechanism is used. The options are as follows:
-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 .
-i The -i option specifies the local user name to use for authentication with the remote rlogind server. This overrides the default which
is the name of the user invoking rlogin.
-l The -l option specifies the name of the remote user to login as. This overrides the default which is the name of the user invoking
rlogin.
-E The -E option stops any character from being recognized as an escape character. When used with the -8 option, this provides a com-
pletely transparent connection.
-K The -K option turns off all Kerberos authentication. This option has no effect since Kerberos authentication is not available in this
version.
-L The -L option allows the rlogin session to be run in ``litout'' (see tty(4)) mode.
-d The -d option turns on socket debugging (see setsockopt(2)) on the TCP sockets used for communication with the remote host.
-e 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.
-p The -p option specifies the port to connect to. This overrides the default which is login.
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 utilized by rlogin:
TERM Determines the user's terminal type.
SEE ALSO
rsh(1)
HISTORY
The rlogin command appeared in 4.2BSD.
BUGS
Rlogin will be replaced by telnet(1) in the near future.
More of the environment should be propagated.
Linux NetKit (0.17) August 15, 1999 Linux NetKit (0.17)