RE: Unix Scripting Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Chris Purcell [mailto:redhat@xxxxxx]
> Sent: Tuesday, May 04, 2004 11:13 AM
> To: Michael.Cupp@xxxxxxxxxxxx
> Subject: RE: Unix Scripting Question
>
>> I found it - the a.lst was typed as a.1st ('one' vs 'ell')
>>
>> The problem is now, when running - I get a list of doesn't exist's -
>>
>> Here is the last one on the screen -
>>
>> /apps/htdocs/afrl/EBS/microsite/17213/Notional XPX Org Charts -- As of
>> 23 Apr 04.doc                              doesn't exist servername
>> $ls -ltr "/apps/htdocs/afrl/EBS/microsite/17213/Notional XPX Org
>> Charts -- As of 23 Apr 04.doc"  -rw-rw-rw-   1 oracle   oinstall
>> 51200 Apr 30 15:28 /apps/htdocs/afrl/EBS/microsite/17213/Notional XPX
>> Org Charts -- As of 23 Apr 04.doc
>>
>>
>> As you can see - I then did an ls against it - and I show it exists
>> through a direct ls
>>
>> (Sorry - I'm totally not a perl person, so I'm down a lonely dark
>> road, alone except for you.  ;)
>>
>>
>> M
>
>
> I sent you another email with the examples that I used.  Please copy my
> a.1st file and see if that works for you on your system.
>
> Also, it looks like there is a bunch of whitespace after the filename.
> Is that just a formatting error in the email?  It should read...
>
> /etc/file doesn't exist
>
> and not
>
> /etc/file                doesn't  exist
>
>
>
> Chris

>> Yes - there is whitespace - but it's after the " - so it's not finding
>> it correct - I'm working on stripping the white space, but it's a big
>> file (2500+ lines) -
>>


Yup, the closing whitespace at the end of your files is causing the
errors. The best thing to do at this point would be to just rename all of
the files to remove the trailing whitespace, but if thats not feasible,
then I'm sure there is a way to script it with Perl making modifications
to my script but I can't think of anything right now.  Maybe there is a
Perl guru on the list that can tell you how to test for files that having
trailing whitespace in the name?   I'll think about and let you know if I
think of anything.

Chris




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux