Thread: make directory
View Single Post

  #2 (permalink)  
Old 08-18-2005, 02:43 PM
rockdalinux's Avatar
rockdalinux rockdalinux is offline
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

I'm not perl expert but it looks like you have mixed shell scripting with perl code.

Okay first try to replace line 22
Code:
22 FILEPATH = '/trs/wg/'.$ToDate.'/';
with
Code:
FILEPATH = "/trs/wg/".$ToDate."/";
and then if command as follows:
Code:
25 if [ ! -d $FILEPATH ];
26 then
27 mkdir $FILEPATH
28 fi
with
Code:
if ( ! -d $FILEPATH  ){
  mkdir($FILEPATH, 0755) || die "Cannot mkdir newdir: $!";
}
Since file extension is .pl (perl) and code seems like perl I'm assumed that it is perl code. If you wanna shell script code then it again need to modify
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote