The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM



Thread: time convert
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #10 (permalink)  
Old 05-21-2008
bakunin bakunin is offline
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,099
Just for the record: the problem is here:

Quote:
Originally Posted by b_manu78 View Post
perl -le 'print scalar localtime($lastlog1);'
You try to expand variable ($lastlog1) inside single quotes. To prevent special characters like "$" from being interpreted by the shell is exactly what single quotes have been invented for.

The line will probably work writing it that way:

Code:
perl -le 'print scalar localtime('"$lastlog1"');'
I hope this helps.

bakunin
Reply With Quote