06-28-2012
Scrutinizer: I don't think I follow your code. Can you please elaborate.
Radoulov: I am using Linux 2.6.18-194.el5
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
Discussion started by: Yinzer955i
2 Replies
2. Shell Programming and Scripting
given a relative path, how do i convert it into a full one. i.e. if i am in
/home/polypus
and i am given foo/bar then to get a full path i can just concatinate it with pwd, but what if i am given "../mama"
how do i programmatically convert:
/home/polypus and ../mama into ... (4 Replies)
Discussion started by: polypus
4 Replies
3. Shell Programming and Scripting
I have to relatively get the path of a file to use it in the script.
The directory structure is /export/opt/XTools/ and under this there are several version directories - 1.0_A0, 1.0_A1, 1.0_A2 etc.,. The actual file is under these directories: installscript.sh
My script should pickup the... (4 Replies)
Discussion started by: chiru_h
4 Replies
4. UNIX for Dummies Questions & Answers
I'm having problems accessing the Knoppix software on my current computer and the replacement CD I ordered hasn't arrived yet.
I have a guess at what the answer would be for this question but I am not sure as I cannot test it with the software.
I have to create a directory called class, and... (1 Reply)
Discussion started by: mzero
1 Replies
5. Shell Programming and Scripting
suppose i ahve a shell script Nsdnet.sh inside a directory /dialp/Release/bin
another file nsdnet_file.csv is under the same directory. Now in the shell script i have call a java file, which reads the csvfile from the commandline.
Now when i run the file as
$ ./Nsdnet.sh ./nsdnet_file.csv
then... (5 Replies)
Discussion started by: priyanka3006
5 Replies
6. Shell Programming and Scripting
I have a script in which i want to print absolute path of the same script irrespective of path from where i run script.
I am using
test.sh:
echo "pwd : `pwd`"
echo "script name: $0"
echo "dirname: `dirname $0`"
when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies
7. Shell Programming and Scripting
Hello,
I have a doubt:-
---------------------
Current script:-
################################################################################################
prefix=user@my-server:
find . -depth -type d -name .git -printf '%h\0' | while read -d "" path ; do (
cd "$path" || exit $?... (4 Replies)
Discussion started by: sahil_jammu
4 Replies
8. Shell Programming and Scripting
Hallo everyone,
I am running an SQL-Script over KShell-Script. Thus, in the KShell-Script there are these lines:
WORKPATH=$PWD/work
EXPORTDIR=export_meine_datei_bitte
EXPORTPATH=${WORKPATH}/${EXPORTDIR}
...
db2 connect to ${DBNAME} || die "can not open database connection"
db2... (9 Replies)
Discussion started by: ratnalein88
9 Replies
9. UNIX for Dummies Questions & Answers
I have a lab I am doing for a Linux Operating class. The question I am stumped on is
"For the following questions, only use the cp command to copy files.
You should currently be inside your lab07 directory. Create a subdirectory inside this directory called ones and copy (working ... (1 Reply)
Discussion started by: CodyMongrel
1 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
ASP(1) User Manual ASP(1)
NAME
asp - find an host IP address by its name
SYNOPSIS
asp [-uv] [-f | [-d dir] [-e ext]] [-a addresses] [-r repetitions] [-s send_delay] [-w wait_time] [-p port] hostname
asp -V
DESCRIPTION
Asp finds the IP address of an Internet connected host. In order to find it, the peer hostname (not the FQDN), and the range of its possi-
ble IP addresses need to be specified. Those IP addresses could be simple IP addresses as 127.0.0.1 or "metaip" addresses as 127.0.0.1-20
or 127.0.0.*: the former is a simple way to avoid to type a lot of consecutive addresses, the latter is short for 127.0.0.1-254.
In order to simplify the management of the associations between hostnames and addresses, asp searches in a specified directory a text file
containing the possible IP addresses of the looked for host. The name of the text file has to be formed by the hostname followed by an
optional extension of your choice.
For example to find the author's dynamic IP address, obviously if I am on line, you can provide my metaip address on standard input with
the command:
echo "195.31.186.1-62
194.166.58.2-18" | asp -f atomic
or you can put my metaip address in a file called atomic in your ~/.asp directory, like this:
echo "195.31.186.1-62
194.166.58.2-18" > ~/.asp/atomic
and then you can simply do:
asp atomic
OPTIONS
-u Update the file /etc/hosts with the IP address of hostname or delete the possible old entry if the address is not found. Obviously
the file have to by writable by the user.
-v Include more verbiage to make output readable by humans. Default consists only of dotted quad IP address, which is intended for
output substitution in scripts.
-f Force the reading of addresses from standard input instead that from the hostname's file.
-d dir
Set the directory containing the addresses file referred by hostname to dir. Default is ~/.asp.
-e ext
Set addresses files extension to ext. Default is no extension.
-a addresses
Set the number of queries to send before make a pause of send_delay seconds. Default is 12 queries.
-r repetitions
Set the number of times to try the same address. Default is 3 times.
-s send_delay
Delay the sending of the next group of addresses send_delay seconds. Default is 2 seconds.
-w wait_time
Wait the peer reply for wait_time seconds. Default is 5 seconds.
-p port
Specify an alternative port number. For default the port number is obtained searching the asp entry in /etc/services.
-V Show version information.
ENVIRONMENT
ASPCMD This variable could be used to store your preferred settings. An option set in this environment variable could be overridden or tog-
gled from command line.
BUGS
UDP is an unreliable protocol, therefore there is a chance you will not find the host even if it is on line. Anyway, if you are sure that
the peer is on line and asp aware, you could adjust the various parameters until you get a reply. At last you will find the correct set-
tings for your particular needs. This until the RDM communication style will be implemented under Linux.
Obviously the hostname has to be unique among the possible IP addresses: asp will hook to the first correct reply.
AUTHOR
Stenio Brunetta <stenio@brunettaeperin.it>
Comments and suggestions are welcome.
ACKNOWLEDGMENTS
Steven N. Hirsch <shirsch@ibm.net> for v1.3 bug fix and for the verbose option.
Colin Phipps <cphipps@doomworld.com> for the tmpnam security issue.
SEE ALSO
aspd(8).
Linux February 1997 ASP(1)