Hello guys I'm a new user of Perl (win32). To date I used an UNIX environment for Windows (CYGWIN) to perform under windows a pre-processing of wind data files with the following shell script Could you help me to translate this shell script into a Perl script. Now I'm just buying O'Reilly "Programming Perl" :>)
Help would be appreciated -------------------------- for i in *.txt # Separate columns do cut -d"," -f2,3 $i > $i.cut # Substitute '^,' by 'NaN," sed -e 's/^,/NaN,/g' -e 's/NaN,$/NaN,NaN/g' $i.cut > $i.nan # Subtitute ',' by 'Tab(\t)' sed -e 's/,/ /g' $i.nan > $i.tab # Rename files mv $i.tab $i.asc done # Delete temporary files rm *.cut rm *.nan # Replace (.txt.asc) extension by (.asc) extension for i in *.txt.asc do mv $i `basename $i .txt.asc`.asc done ls *.asc *.txt wc -l *.asc ------------------------ _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users