Issue regarding dos2unix perl script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Issue regarding dos2unix perl script
# 8  
Old 06-30-2011
I have no idea why that script is doing certain things, and no idea how some of those local functions are supposed to be working, so I can't write it for you, best I can do is give you the pieces you need and offer advice, and improve by trial and error. To do this I need replies from you telling me if what I did worked, otherwise I'm no further along.

Have you tried anything else I've suggested yet? Did it work or not?

I'd suggest commenting out the chdir's and system's until you get it at least acknowledging that you have a file to operate on, and the right number of them at that
# 9  
Old 06-30-2011
Sure.. let me try what you suggested and I will update you very soon.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script exits when using UNIX2dos / dos2UNIX

I'm not sure why but my script quits automatically at the point where unix2dos / dos2unix command is used. :confused::confused::confused: How do a fix it? LOG_FILE=MADDY.txt unix2dos ${LOG_FILE} exec 2> $LOG_FILE 1>&2 echo ${LOG_FILE} The script exists after the below... (3 Replies)
Discussion started by: machomaddy
3 Replies

2. Red Hat

Oracle Linux issue - all files FTPed to it from windows need to to be processed with dos2UNIX

Hello Friends, I have observed one recent issue about ftp from windows to Linux. Initially we had Solaris unix and any file sent from windows to solaris via ftp (binary or ascii) worked smoothly. Say for e.g if I sent a shell script to soalris from windows, that script used to run corectly.... (17 Replies)
Discussion started by: Albert_Pinto7
17 Replies

3. Shell Programming and Scripting

Perl script issue

Hi All, I have a perl script which I am using in Windows environment. There is one more file called "functions.txt" which is having all the functions defined to used in my perl script. And the path for this function file is defined in my perl script. Howeever sometimes I am getting below error... (4 Replies)
Discussion started by: gr8_usk
4 Replies

4. Web Development

Accessing a Perl CGI script, security issue

Hi Everybody, I was wondering if it was possible for someone to gain access to my Perl CGI scripts before they are interpreted by Perl (mod_perl on apache2) i.e. getting a hold of my raw scripts and not the html output? Let's say I use the DBI module where I have the hostname, user and... (2 Replies)
Discussion started by: z1dane
2 Replies

5. Shell Programming and Scripting

Perl script issue: print

Can someone tell me what I'm doing wrong with my perl script? I am new to Perl. This isn't even the final script, I'm just testing to see if it will print the directories with the files in it. For some reason my output is only printing the 1st, 6th, and last entries of the @sub_dir array. Each... (3 Replies)
Discussion started by: man
3 Replies

6. Shell Programming and Scripting

Perl Script issue. What am I doing wrong?

#!/usr/local/bin/perl open (MYFILE, 'logs_report'); while (<MYFILE>) { $rec=$_; chomp ($rec); @arr=split(/ /,$rec); print $rec,"\n" if ($arr!~/OK/); open (MYF, '>data.txt'); print $rec,"\n" if ($arr!~/OK/); close (MYF); (14 Replies)
Discussion started by: SkySmart
14 Replies

7. Shell Programming and Scripting

dos2unix

hi, need some urgent inputs..... I have a folder, which has both files and directories as its contents. I want to convert all the files (Excluding the directories) from dos to unix mode using the command 'dos2unix'..... please can any one help me in providing the command to convert... (3 Replies)
Discussion started by: cmaroju
3 Replies

8. Shell Programming and Scripting

Perl Script Issue - Please Help * Thanks!!!

Please help me with my script please. I am trying to do the following: 1. Read files for the current directory 2. Open and read from nbe files files only 3. Read only the lines with the results pattern 4. Split the line and print 3rd field Please indicate what line I need to modify. ... (8 Replies)
Discussion started by: jroberson
8 Replies

9. UNIX for Dummies Questions & Answers

dos2unix - editing script - Help Urgent Please

Hi this is my first time on this forum so sorry if I posted this to the wrong area. I need help with the following. I have a basic FormMail cgi script I use. When I upload the script using filezilla, there is one line in the script that changes. The line should read &get_date; instead it... (2 Replies)
Discussion started by: lydp101
2 Replies

10. Shell Programming and Scripting

calling dos2unix on shell script from within the script

I have a build script. It was created on Linux. For some reason, I got it to windows and modified it. And brought it back again to Linux. Since there is the question of the ^M chars appearing, the way out is to do a dos2unix on the script file. This is done manually. Is there a way to call... (4 Replies)
Discussion started by: vino
4 Replies
Login or Register to Ask a Question