Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read a variable and store it

Status
Not open for further replies.

ttlhr

Technical User
Jan 13, 2010
7
US
Hello

I am looking to see how to acheive this, but cannot figure out a way:

1. open a file from a remote location
2. look for a specific string (ex "byte size is 6678KB", but the "KB" value changes everyday)
3. store this value for future comparision

Can someone guide me please?
 
You should probably take a look through the perl docs. If you go to your command prompt and type perldoc perl it will list, among other things, Tutorials that come with the perl install.

In perticular, for this problem, take a look at [ul][li]perldoc perlintro[/li][li]perldoc perlrequick[/li][/ul]

If you read through those, you should have plenty of information to solve your problem.
 
Thanks, i figured out reading the documents.

something like, awk '/the value/{print $2}

 
Thanks, i figured out reading the documents.

something like, awk '/the value/{print $2}

 
you figured out from the perl documentation that you needed to use the system awk command???????????

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top