I have a list of hostnames in a txt file . I need to do nslookup or other command on linux and get the ip address and if you dont find an ip address then put 0.0.0.0 instead in the output text file along with the hostname.
So input
Output
thanks
G
Last edited by Scott; 03-20-2014 at 05:31 AM..
Reason: CODE tags instead of ICODE tags
Hi
I have two files a1 and b1
a1 has the following job names
ab
cd
ef
b1 has the following job details
/*----------- ji -----------------*/
asdasd fgd
saas dfdf
asas fd gfg
/*---------- ab ----------------*/
ara jhk
dfhk asjla
condition: s(abc_wf_hi) (10 Replies)
Write a quick shell snippet to find all of the IPV4 IP addresses
in any and all of the files under /var/lib/output/*, ignoring
whatever else may be in those files. Perform a reverse lookup on
each, and format the output neatly, like "IP=192.168.0.1,
... (0 Replies)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
Hi all
Below this is my script..I want to write the command to create a text file in my script below. If anyone know how to do...show me the result.I also want to do this script run automatically without type in terminal.
Thanks.
#!/usr/bin/sh... (6 Replies)
Can someone please tell me why this is not working? I have created numerous pdf's from text files by following these instructions and this time it is not working.
Convert jpeg files to PDF under Linux | bitPrison.net
convert /home/liveuser/Documents/hw7 /home/liveuser/Documents/hw7.pdf... (5 Replies)
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Hi. I need assistance with the replacing of text into a specific file via a bash script.
My bash script, once run, currently provides a menu of computer names to choose.The script copies onto my system various files, depending what computer was selected in the menu.This is working OK.
Now, I... (1 Reply)
Hello.
The task :
Using multiple commands like :
gdisk -l $SOME_DISK >> $SOME_FILEI generate some text file.
For readiness I must insert page break.
When the program is finished I want to convert the final text file to a pdf file.
When finished, I got two files : One text file and One pdf... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT OSF1
ap
ap(8) System Manager's Manual ap(8)NAME
ap - Parses addresses RFC 822-style
SYNOPSIS
/usr/lib/mh/ap [-form file] [-format string] [-help] [-[no]normalize] [-width columns] addrs...
OPTIONS
Overrides the default output format of ap. The output is formatted according to the instructions in the specified file. This must be a
format file; see mh-format(4). Overrides the default output format of ap. The output is formatted according to the instructions in the
specified string. This must be a format string; see mh-format(4).
The argument to the -format option must be interpreted as a single token by the shell that invokes ap. Therefore, you should usually
place the argument to this option inside double quotes ("). Prints a list of the valid options to this command. The -normalize
option tells ap to try to find the official host name of the address. This is the default behavior, which can be suppressed using
the -nonormalize option. Specifies the width of the screen in columns.
DESCRIPTION
The ap program parses addresses according to the ARPA Internet standard. It also understands many nonstandard formats. It is useful for
seeing how MH will interpret an address.
The ap program treats each argument as one or more addresses, and prints those addresses in the official RFC 822 format. Hence, it is usu-
ally best to enclose each argument in double quotes (") for the shell.
In addition to the standard escapes, ap also recognizes the additional escape error, which is a diagnostic that is returned if the parsing
operation failed.
The default settings for the ap command are -normalize and -width columns, where columns is equal to the the width of the terminal.
RESTRICTIONS
On systems where MH is configured with the BERK option, address parsing is not enabled.
EXAMPLES
This is the default format string used by ap:
%<{error}%{error}: %{text}%|%(proper{text})%>
If an error was detected, the preceding string instructs ap to print the error, a colon (:), and the address that is in error. Otherwise,
the ap command output is the proper RFC 822 format of the address.
FILES
User profile. System customization file.
SEE ALSO
Commands: dp(8)
Files: mh-format(4)
Standard for the Format of ARPA Internet Text Messages (RFC 822)
ap(8)