Hello everyone,
could you help me out with a little problem (I'm quite new to perl):
I got the following output:
(Note: I'm using AIX / Linux)
What I'd like to do is store only the "Jul 10" in a variable ...
Cutting it out is easy:
But how do I get this stored within a variable ?
Using the following stores the whole string within the variable and NOT only the "Jul 10":
Regards,
Thomas Schmitt
could you help me out with a little problem (I'm quite new to perl):
I got the following output:
(Note: I'm using AIX / Linux)
Code:
ls -all /datastore/backup
-rw-r--r-- 1 root root 6431369457 Jul 10 07:57 /datastore/backup
What I'd like to do is store only the "Jul 10" in a variable ...
Cutting it out is easy:
Code:
ls -all /datastore/backup | awk '{print $6 " " $7}'
But how do I get this stored within a variable ?
Using the following stores the whole string within the variable and NOT only the "Jul 10":
Code:
$dat2=`ls -all /datastore/backup | awk '{print $6 " " $7}'`;
print $dat2, "\n";
-rw-r--r-- 1 root root 6431369457 Jul 10 07:57 /datastore/backup
Regards,
Thomas Schmitt