I want to print just ASN that are about my responsibility, this example only that with ASN , 5 and 6.
Example: I am using this command
This is a output of my command.
But I wanted that my output wil be this:
Because after i wil need to send e-mail to ASN5 and ASN6 separated.
Thanks all
Last edited by Scott; 06-01-2010 at 07:02 PM..
Reason: Please use code tags
Using grep as you do will not work as it will capture 5 and 6 anywhere in the line. If you have a date or time that has a 5 or 6 in it, grep will return the line.
Then When I try to do with these commands . I m with problem.
My file is so.
I wanted to put result of command in variable with the example:
Because I will need other data in ASNS.
I want to do "Whois" in the field IP inside the ASNS variable
I wanted that for each line of my variable ASNS . The variable IP catch the value of field IP that is inside the $ASNS and to execute command whois, after this his send e-mail to me and starting again with second data of variable ASNS.And finally replacing field <IP> and field <data> set in my template.
I tried so , but isn't work. My for is wrong.
Thanks all
Last edited by Scott; 06-01-2010 at 07:03 PM..
Reason: Code tags, please...
Please use [code] tags when you post data or code sample.
Please remove useless UUOC
State your environment/shell
Base on your second post you need something like:
Wait a second , you need only the IP, lets try
and
I hope you can fix your script from here.
Success,
I think that I didn't explained correctly my question.
My english is poor then I think it's a problem.
If you can help me ,, it will be good.
I need to print all ASN that are about my responsability.
In this case ASN5 and ASN6 together so.
I m put this in variable , Im using it.
Now I need to get field "IP" inside the variable First .
Because I need to do "WHOIS" in each "IP"
After this I need to do command " WHOIS" , i have a script to do "WHOIS".
Then I think that could be make so.
When I do this "command for" i want to print my line(s) that are related with my ip , so.
I have some data like this:
4258092
TRXCODE a 19
CARDNBR a 10
PINFLAG a 6
FUISSUER a 12
PRODUCT a 24
STATE n 1
I want out put this format:
<?xml version="1.0" encoding="GB2312"?>
<convGrp>
<grpid>4258092</grpid>
<script>
<!]>
... (4 Replies)
I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields.
Sample lines from the .csv file:
Device Name,Personnel,Date,Solution... (1 Reply)
Hi,
I have a large number of files which are written as csv (comma-separated values).
Does anyone know of simple sed/awk command do achieve this?
Thanks!
---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ----------
Guess I asked this too soon. Found the... (0 Replies)
Korn Shell in AIX 6.1
I want to print the below shown pipe (|) separated list line by line.
line=es349889|nhb882309|ts00293|snh03524|bg578835|bg37900|rnh00297|py882201|sg175883
for i in line
do
echo "Hello $line "
done
I wanted to execute the above for loop. But i can't even set the... (3 Replies)
Hi All,
I need to grep through a file for a string and print the next ten lines to a file separating the lines with a , and save it as a csv file to open it as a XL file. The 10 lines should be on a sigle row in xl.
Any suggesstions please.
Note; I dont have a GNU Grep to use -A flag.
... (6 Replies)
Hi.
I have a tab separated file that has a couple nearly identical lines. When doing:
sort file | uniq > file.new
It passes through the nearly identical lines because, well, they still are unique.
a)
I want to look only at field x for uniqueness and if the content in field x is the... (1 Reply)
I need to arrange output of SQL query into a comma separated format and I'm struggling with processing the output...
The output is something like this:
<Attribute1 name><x amount of white spaces><Atribute value>
<Attribute2 name><x amount of white spaces><Atribute value>
<Attribute3... (2 Replies)
hi,
my input file is containg uid, eriMaster ,eriResign, ericontry, dept.
some of the uid are not having all info.
out put should include all info irrespctive of datas of input file
if any one data is missing, then it has to print Null or zero..then continue with the existing one.
here... (0 Replies)
Hello,
I read a file whose in lines are datas and between thses datas there is blank characters (10, 12 or 5 or 1 .......)
So when i use the command while read line in the script(see under) there is also only one character between the datas and the others blank characters are not here.
... (3 Replies)