Malcolm Dew-Jones <> wrote:
> Sylvie Stone () wrote:
>
> The date command may be able to output the format you want without using
> awk.
>
> $ date '+%b%Y'
> Oct2003
Or don't use date at all:
use POSIX qw(strftime);
$month = strftime "%b%Y", localtime;
> : #!/usr/bin/perl
> : $month=`/bin/date | awk '{print \$2\$6}'`;
[...]
> Perhaps it isn't a `?', I will guess the ? is a place holder to indicate a
> control character in the name, such as a new-line from the end of the awk
> output.
Indeed:
$month=`/bin/date | awk '{print \$2\$6}'`;
$len = length $month;
print "'$month' is $len characters long\n";
--
Glenn Jackman
NCF Sysadmin