Error when running script involving machine name and local network
Hi everyone, I'm trying to write a script that takes a machine name as a command line argument and displays a message informing me whether the host is on the local network.
Here's what I have:
Whenever I run it with my machine name (ubuntu) I get the following output:
I'm not sure what the error means and why I'm getting it, as well as if the script is even doing what it should be doing. Any advice would be appreciated. Thanks!
Hi guys,
I need to run and test some shell script. At work, i work on ksh. I don't have any such software/client installed at home and i cannot always connect to work from home. At home i have Windows Vista.
Is there a free and reliable software where i can run my ksh script?
Please let me... (4 Replies)
Hi All,
URGENT - Please help me form a scipt for this:
I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server)
I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Hi ,
How to check whether web server is running from remote machine
How to check whether web server is running on web server itself
Can any one help me soon (1 Reply)
Hi,
i have been developing a shell script to transfer a set of files from one ubuntu system to another.
Task: while executing the script the files ( ls, dir, cat) in the source machine should transfer to destination machine(at /home/mac/mac/bin)
While the script is executed once again, It... (0 Replies)
Hi All..
Am new to Unix!!
Am creating a shell script in which a scenario is like i have transfer the output file from unix machine (Server) to local directory (Windows xp).
And also i have to transfer the input file from the local directory to Unix machine (Server)
Any help from you... (1 Reply)
Hi Am using unix Ksh
Am getting the problem while transferring zero size files through the script .
When i transfer zero size files from local machine to remote machine manually i can able to do it .
My question its beause of zero size files am not able to transfer through script ? or its... (2 Replies)
I need to run a local shell script on a remote machine. I am able to achieve that by executing the command
> ssh -qtt user@host < test.sh
However, when I try to pass arguments to test.sh it fails.
Any pointers would be appreciated. (7 Replies)
I want to SSH to 192.168.1.15 Server from my machine, my ip was 192.168.1.99
Source Destination was UP, with IP 192.168.1.15.
This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's because I need to apply the same rules in... (2 Replies)
Team,
Presently i am running a script from my local box(i.e jumpbox) to all the remote machines.Basically fetching basic queries like pwd,mkdir,touch etc and i am able to successfully fetch it from my local machine.But when i want to check certain database related queries like the dbstat... (20 Replies)
I have a script in local server
cd /home/dell/work/BOP/testdir
./processchk po (here processchk is a script & po is passed as an argument)
Now I want to execute this script from remote server
ssh $username@$hostname "cd /home/dell/work/BOP/testdir; ./processchk po"
But Its getting error... (9 Replies)
Discussion started by: manohar2013
9 Replies
LEARN ABOUT BSD
htable
HTABLE(8) System Manager's Manual HTABLE(8)NAME
htable - convert NIC standard format host tables
SYNOPSIS
/etc/htable [ -c connected-nets ] [ -l local-nets ] file
DESCRIPTION
Htable is used to convert host files in the format specified in Internet RFC 810 to the format used by the network library routines. Three
files are created as a result of running htable: hosts, networks, and gateways. The hosts file may be used by the gethostbyname(3N) rou-
tines in mapping host names to addresses if the nameserver, named(8), is not used. The networks file is used by the getnetent(3N) routines
in mapping network names to numbers. The gateways file may be used by the routing daemon in identifying ``passive'' Internet gateways; see
routed(8C) for an explanation.
If any of the files localhosts, localnetworks, or localgateways are present in the current directory, the file's contents is prepended to
the output file. Of these, only the gateways file is interpreted. This allows sites to maintain local aliases and entries which are not
normally present in the master database. Only one gateway to each network will be placed in the gateways file; a gateway listed in the
localgateways file will override any in the input file.
If the gateways file is to be used, a list of networks to which the host is directly connected is specified with the -c flag. The net-
works, separated by commas, may be given by name or in Internet-standard dot notation, e.g. -c arpanet,128.32,local-ether-net. Htable
only includes gateways which are directly connected to one of the networks specified, or which can be reached from another gateway on a
connected net.
If the -l option is given with a list of networks (in the same format as for -c), these networks will be treated as ``local,'' and informa-
tion about hosts on local networks is taken only from the localhosts file. Entries for local hosts from the main database will be omitted.
This allows the localhosts file to completely override any entries in the input file.
Htable is best used in conjunction with the gettable(8C) program which retrieves the NIC database from a host.
SEE ALSO intro(3N), gettable(8C), named(8)BUGS
If the name-domain system provided network name mapping well as host name mapping, htable would no longer be needed.
4.2 Berkeley Distribution May 22, 1986 HTABLE(8)