![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| etc host entry problem | kandanathan | SUN Solaris | 5 | 06-04-2008 02:47 AM |
| Adding printer entry into host file | Wade Gava | HP-UX | 2 | 03-28-2008 08:04 AM |
| problem in adding an extra entry in a dir:fuse imlementation | Tanvirk | Linux | 0 | 01-24-2008 02:40 PM |
| Adding entry into crontab in ksh program | nir_s | Shell Programming and Scripting | 2 | 03-31-2005 10:45 AM |
| Adding a Unix machine to the domain | Wize | UNIX for Dummies Questions & Answers | 3 | 09-15-2004 02:41 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
adding a host entry on another machine
I have written this small script to add an entry to a remote /etc/hosts file which needs to be run from our central admin box and is passed one parameter $1 <hostname>
Code:
#!/bin/ksh echo "Which host entry would you like to add to $1" read host_to_add echo "what is the IP address?" read ip echo "Adding $host_to_add $ip to $1" ssh $1 'echo $host_to_add $ip >> /etc/hosts' Does anybody have an idea on how I can get around this??? Cheers |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|