addressalign-toparrow-leftarrow-leftarrow-right-10x10arrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1languagelaunch-new-window--smalllight-bulblightning-boltlinklocation-pinlockm-swarmSearchmailmediummessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstar-shapestartickettrashtriangle-downtriangle-uptwitteruserwarningyahooyoutube

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

From: chris
Sent on: Sunday, May 11, 2008, 1:30 PM
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.
>
https://mobile.yah...­
> 
> 
> 
> --
> Please Note: If you hit "REPLY", your message will
> be sent to everyone on
> this mailing list ([address removed])
> https://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:
> https://linux.meet...­
> To unsubscribe or to update your mailing list
> settings, click here:
> https://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])
> https://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:
> https://linux.meet...­
> To unsubscribe or to update your mailing list
> settings, click here:
> https://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.  https://mobile.yah...­

People in this
group are also in: