RE: [linux-392] csh won't run

From: user 4.
Sent on: Sunday, May 11, 2008 6:21 PM
This has been a problem with other file names.

For now, my work around was to create a file.  Cut and paste the contents
into the new file.  Delete the old file and rename the new file to the old
file name.

I haven't really looked into the details of how files are being ftped.

I had a problem with garbage in the last line of zencart files that I was
downloading to.

Once you get used to the possibilities, it doesn't trip you up anymore.

Michele

-----Original Message-----
From: [address removed] [mailto:[address removed]] On Behalf Of chris
Sent: Sunday, May 11,[masked]:31 PM
To: [address removed]
Subject: RE: [linux-392] csh won't run

Probably needs to be sent as ASCII instead of BIN,
since it's a plain text script.  But if it broke
suddenly I would be suspicious of a rouge filename
getting matched.

--- Michele <[address removed]> wrote:

> Well the script was in a bin with 700.
> 
> I would have rewritten it a little, but I could get
> the thing working.
> 
> It's a linux file transfer problem.
> 
> For the life of me, I can't remember the trick I
> used to use to that.
> 
> 
> -----Original Message-----
> From: [address removed]
> [mailto:[address removed]] On Behalf Of chris
> Sent: Sunday, May 11,[masked]:07 PM
> To: [address removed]
> Subject: Re: [linux-392] csh won't run
> 
> Well you're getting an error from csh (the Usage
> error), so I don't think you deleted it.  Maybe you
> have a file with a space, quote, or other special
> character that is messing up the loop?
> 
> I would also try to come up with a perl/python/ruby
> script that calls unlink() call directly, it will
> deal
> with unusual file names much better.  A malicious
> user
> could even leverage a shell script like that to
> wreck
> the system (like a file named 'foo\ \/etc\/passwd\/
> _.jpg')
> 
> --- Michele <[address removed]> wrote:
> 
> > I have a linux problem.  I was hoping someone may
> > have encountered.  I don't
> > know where to start with this one.  I think it's
> an
> > admin problem.
> > 
> > I'm on a redhat linux web server.
> > 
> > When I type csh, the prompt doesn't change to %. 
> > Yesterday it did.
> > 
> > I'm trying to run a a csh script.
> > 
> > I wrote a shell script and it worked fine.
> > 
> > The next time I log, I run the script "./rm_csh ."
> > and get:
> > 
> >         -'nknown option: `-
> > 
> >         Usage: csh [ -bcdefilmnqstvVxX ] [
> argument
> > ... ].
> > 
> >  
> > 
> > When I run the script "csh -f rm_csh .", I get:
> > 
> > foreach: Words not parenthesized.
> > 
> > I can't figure out what's going on.  The script
> > works fine on day, the next
> > day the line #!/bin/csh -f is not recognized.
> > 
> > This is the whole rm_csh script:
> > 
> >         #!/bin/csh -f
> > /*** fails on this line as ./rm_csh
> > 
> >         set todayDate=`date "+%m%d%Y"`
> > 
> >         set thePath=${1}
> > 
> >         foreach FILE (`ls ${thePath}/*_*.jpg`)­
> > /*** error on this line as csh -f rm_csh
> > 
> >             set fileDate = `echo ${FILE} | cut -f2
> > -d"_" | cut -f1 -d"."`
> > 
> >             if ("${fileDate}" != "${todayDate}")
> > then
> > 
> >                rm -rf ${FILE}
> > 
> >             endif
> > 
> >         end
> > 
> >  Any ideas?  I'm thinking it's the environment for
> > some reason, but I don't
> > know how to fix it.
> > 
> >  The script worked yesterday.  Today my server
> > doesn't recognize csh.
> > 
> >  Michele
> > 
> >  
> > 
> 
> 
> 
>  
>
____________________­____________________­____________________­________________
> ________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.
>
http://mobile.yah...­
> 
> 
> 
> --
> Please Note: If you hit "REPLY", your message will
> be sent to everyone on
> this mailing list ([address removed])
> http://linux.meet...­
> This message was sent by chris
> ([address removed]) from The New York
> GNU/Linux Meetup Group.
> To learn more about chris, visit his/her member
> profile:
> http://linux.meet...­
> To unsubscribe or to update your mailing list
> settings, click here:
> http://www.meetup...­
> 
> Meetup Support: [address removed]
> 632 Broadway New York NY 10012 USA
> 
> 
> 
> 
> --
> Please Note: If you hit "REPLY", your message will
> be sent to everyone on this mailing list
> ([address removed])
> http://linux.meet...­
> This message was sent by Michele
> ([address removed]) from The New York
> GNU/Linux Meetup Group.
> To learn more about Michele, visit his/her member
> profile:
> http://linux.meet...­
> To unsubscribe or to update your mailing list
> settings, click here:
> http://www.meetup...­
> 
> Meetup Support: [address removed]
> 632 Broadway New York NY 10012 USA
> 
> 



 
____________________­____________________­____________________­________________
________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yah...­



--
Please Note: If you hit "REPLY", your message will be sent to everyone on
this mailing list ([address removed])
http://linux.meet...­
This message was sent by chris ([address removed]) from The New York
GNU/Linux Meetup Group.
To learn more about chris, visit his/her member profile:
http://linux.meet...­
To unsubscribe or to update your mailing list settings, click here:
http://www.meetup...­

Meetup Support: [address removed]
632 Broadway New York NY 10012 USA

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy