Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > Your Distro > Redhat / Fedora Linux Help
Reload this Page csh not working
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Redhat / Fedora Linux Help Help and discussion related to Redhat and Fedora Linux.

Reply
 
Thread Tools Display Modes
Old 05-11-2008   #1 (permalink)
newdejavu
Just Joined!
 
Join Date: May 2008
Posts: 1
csh not working

All of the sudden, today, when I type csh the prompt does not change to %.

And, I’m trying to run a a csh script.

I wrote a shell script and it worked fine yesterday.

The next time I log, I run the script “./rm_csh .” and get:


Code:
-'nknown option: `-

Usage: csh [ -bcdefilmnqstvVxX ] [ argument ... ]
When I run the
Code:
script “csh –f rm_csh .”, I get:

foreach: Words not parenthesized.
I can’t figure out what’s going on. The script works fine one day, the next day the line #!/bin/csh –f is not recognized.

This is the whole rm_csh script:


Code:
Code:
#!/bin/csh –      /*** fails on this line as ./rm_csh
 
set todayDate=`date "+%m%d%Y"`

set thePath=${1}

foreach FILE (`ls ${thePath}/*_*.jpg`) 
    set fileDate = `echo ${FILE} | cut -f2 -d"_" | cut -f1 -d"."`

    if ("${fileDate}" != "${todayDate}") then

       rm -rf ${FILE}

    endif

end
I'm on a redhat linux web server.
newdejavu is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 11:32 PM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0