addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

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

From: user 4.
Sent on: Sunday, May 11, 2008 12:24 PM
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

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