Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: String searching in file

by cbtshare (Scribe)
on Feb 09, 2018 at 22:02 UTC ( #1208864=note: print w/replies, xml ) Need Help??


in reply to Re: String searching in file
in thread String searching in file

sorry about that:
@command=`aws ec2 describe-instances --filters "Name=instance-state-na +me,Values=running" | grep PrivateDnsName | cut -d ":" -f2| cut -d '" +' -f2 | sort -u `;

Sample Results in @command:

ip-10-1-129-212.us-west-2.compute.internal ip-10-1-129-168.us-west-2.compute.internal ip-10-1-129-212.us-west-2.compute.internal ip-10-1-129-158.us-west-2.compute.internal ip-10-1-129-78.us-west-2.compute.internal ip-10-1-1-145.us-west-2.compute.internal ip-10-1-65-215.us-west-2.compute.internal ip-10-1-129-194.us-west-2.compute.internal ip-10-1-1-252.us-west-2.compute.internal ip-10-1-67-133.us-west-2.compute.internal
My issue is that it keeps on printing "not found" even when the ip address is in the file

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1208864]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2019-12-11 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?