Lets say i have this output:
-rwxr-xr-x 1 mtorres support 826 Nov 12 12:47 notify
How would i grab the '12:47' part (and if possible remove the ":" to make it 1247)
I need to assign it to a variable because i will be comparing it later in the script.
The above output is the result of an 'ls -la $filename' command.
i've tried:
$timestamp = system("ls -ltr $BDIR/$host|awk '{print $8}'|awk -F: '{print $1$2}'");
but that doesnt work at all. it grabs the whole ls line for some reason
Please help, its driving me crazy!#%
-rwxr-xr-x 1 mtorres support 826 Nov 12 12:47 notify
How would i grab the '12:47' part (and if possible remove the ":" to make it 1247)
I need to assign it to a variable because i will be comparing it later in the script.
The above output is the result of an 'ls -la $filename' command.
i've tried:
$timestamp = system("ls -ltr $BDIR/$host|awk '{print $8}'|awk -F: '{print $1$2}'");
but that doesnt work at all. it grabs the whole ls line for some reason
Please help, its driving me crazy!#%