Thanks Don and Germany. This is the right train of thought.
To get it to work I had to escape the string that sets the terminal title. Like this...
Code:
set prompt="$USER@`hostname -s`:%{^[]0;`hostname -s`^G%} "
*Note: This escaped string cannot be at the end of the $prompt string. You'll notice a space character after the escaped string in the example above. If you don't want that last space character, put the escaped string in front...
Code:
set prompt="%{^[]0;`hostname -s`^G%}$USER@`hostname -s`:"
Hi,
I am having nightmare issue-ing remote ssh command from a CGI perl script.
It just won't run on debug message: It says permission denied. Can I even do this? as the apache server running under DAEMON account probably can't execute it? Is this the case of what's going on?
Here is my... (3 Replies)
Hi all,
I am facing the following issue:
Host A should execute a remote command (say pwd) on host B2.
B2 is not directly reacheable but you have to connect from a to B1, then from B1 you can execute the command ssh user@B2 pwd.
B1 and B2 are directly connected:
A => B1 => B2
| ... (3 Replies)
Hi all,
Today I want to write a script to run the commands remotely.
If I run the command as follows:
ssh <user>@<ip> 'ls; pwd'
it works fine.
But when I want to use ssh to set view in clearcase, it will lose the response. as follows
ssh <user>@<ip> 'cleartool setview <view_name>; pwd'... (1 Reply)
ssh -q <hostname> /opt/tcs/satish/tst.ksh
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh
tst.ksh has "nohup <command> & "
when i execute below script , its throwing error as
nohup can not be found
ssh -q <anotherserver> /opt/tcs/satish/tst.ksh > log &
can someone let me... (5 Replies)
Hi I have a perl command that doesn't seem to be working correctly. It appears to be fine but even when i try and run it manually same thing. Can someone take a look at this and tell me what they think the problem could be?
Here is the perl Line:
system ("echo 'ssh -t -t $user\@$_ \"cd... (3 Replies)
Hi
The command below does not work as it require to take command in the breakers
But If I do so the variable values get lost
ssh testserver01 'dsmc q b "${ARCHIVE_DIR}*" -sub=yes -querysummary -inactive -fromd="${BACKUP_DATE}"'
Thank you. (3 Replies)
How should i make the following code working
#!/bin/bash
INPUTFILE="test.txt"
while read STRING; do
IP=`host -t A $STRING | awk '{print $NF}'`
HOSTNAME=`ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no $IP "hostname"`
echo $HOSTNAME > out.txt
done < $INPUTFILE
At this moment while... (3 Replies)
Hi,
My goal is to connect from unix server A to windows server B and call a bat file on windows.
I am able to succeed in remoting to windows and executing a command, the issue i am facing is the shell scrip is exiting without making sure of bat file success.
Can you please help me in... (4 Replies)
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
LEARN ABOUT OSF1
ether_aton
ethers(3) Library Functions Manual ethers(3)NAME
ethers, ether_ntoa, ether_aton, ether_ntohost, ether_hostton, ether_line - Ethernet address mapping operations
SYNOPSIS
#include <sys/types.h> #include <sys/socket.h> #include <net/if.h> #include <netinet/in.h> #include <netinet/if_ether.h>
char * ether_ntoa(e) struct ether_addr *e;
struct ether_addr * ether_aton(s) char *s;
ether_ntohost(hostname, e) char *hostname; struct ether_addr *e;
ether_hostton(hostname, e) char *hostname; struct ether_addr *e;
ether_line(l, e, hostname) char *l; struct ether_addr *e; char *hostname;
Arguments
The ether_addr structure is defined in <netinet/if_ether.h>
DESCRIPTION
These routines are useful for mapping 48 bit Ethernet numbers to their ASCII representations or their corresponding host names, and vice
versa. The mapping is obtained from the /etc/ethers database; see ethers(4).
The function ether_ntoa() converts a 48 bit Ethernet number pointed to by e to its standard ACSII representation; it returns a pointer to
the ASCII string. The representation is of the form:
x : x : x :x : x : x
Where x is a hexadecimal number between 0 and ff. The function ether_aton() converts an ASCII string in the standard representation back
to a 48 bit Ethernet number; the function returns NULL if the string cannot be scanned successfully.
The function ether_ntohost() maps an Ethernet number (pointed to by e ) to its associated hostname. The string pointed to by hostname must
be long enough to hold the hostname and a NULL character. The function returns zero upon success and non-zero upon failure. Inversely,
the function ether_hostton() maps a hostname string to its corresponding Ethernet number; the function modifies the Ethernet number pointed
to by e. The function also returns zero upon success and non-zero upon failure.
The function ether_line() scans a line (pointed to by l) and sets the hostname and the Ethernet number (pointed to by e). The string
pointed to by hostname must be long enough to hold the hostname and a NULL character. The function returns zero upon success and non-zero
upon failure. The format of the scanned line is described by ethers(4).
FILES
Database that maps Ethernet addresses to hostnames
RELATED INFORMATION
Commands: rarpd(8)
Files: packetfilter(7), ethers(4) delim off
ethers(3)