Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: String searching in file

by marinersk (Priest)
on Feb 09, 2018 at 20:08 UTC ( #1208860=note: print w/replies, xml ) Need Help??

in reply to String searching in file

I don't see your results in the post; nor what was expected and why it's different.

I see an opening backtick on the @command= line, but no closing backtick. Is that normal?

Replies are listed 'Best First'.
Re^2: String searching in file
by cbtshare (Scribe) on Feb 09, 2018 at 22:02 UTC
    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:
    My issue is that it keeps on printing "not found" even when the ip address is in the file

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1208860]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2018-07-16 14:53 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (342 votes). Check out past polls.