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-circleimageimagesinstagramlinklocation-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:06 PM

I got a problem with bash parsing too.

 

The problem was files I transferred over through filezilla, rather than creating on the server.

 

I’ve had this problem on this server with perl scripts before.

 

I can’t remember the work around, but it involve moving the file or copying it or touching it, removing the original and then renaming it.

 

Michele

 


From: [address removed] [mailto:[address removed]] On Behalf Of Aaron D
Sent: Sunday, May 11,[masked]:05 AM
To: [address removed]
Subject: Re: [linux-392] csh won't run

 

type locate csh.  or which csh it should return /bin/csh
If not csh is probably not installed on the machine.  I'm running ubuntu and I dont have csh.
Why not use bash.  better yet write a perl script in 10 lines.

--Aaron

 

-----Original Message-----
From: Michele [mailto:[address removed]]
Sent: Sunday, May 11,[masked]:49 AM
To: [address removed]
Subject: [linux-392] csh won't run

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

 





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
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
To unsubscribe or to update your mailing list settings, click here

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])
This message was sent by Aaron D ([address removed]) from The New York GNU/Linux Meetup Group.
To learn more about Aaron D, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

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