This is the terrible error handler.
It emergency-exits on built-in commands.
For the external command rm you can try to redirect stderr (and stdout) with
Last edited by MadeInGermany; 09-24-2014 at 05:44 PM..
Reason: typo
This User Gave Thanks to MadeInGermany For This Post:
Your tcsh script seems to have printexitvalue set, maybe set in your ~/.cshrc or ~/.tcshrc.
Undo with
You can suppress the initial run of .cshrc and .tcshrc by a -f option in the shebang (first line)
This User Gave Thanks to MadeInGermany For This Post:
I have a file containing data in multiple columns. The colums are seperated by pipe (|). I need to extract information as below:
myfile_20130929_781;10;100.00
where myfile.txt is the file name. 10 is the number of records in the file starting with 120 and 100.00 is the sum of 26th field of... (16 Replies)
HI ,
I am tryin to copying multiple files from some dir. If the files are not present. It should not throw error in the screen. HOw to do that . Please help (4 Replies)
Hi All
this is a simple script
#! /bin/bash
FileCnt=`ls -lrt $DIR/* | wc -l`
echo $FileCnt
how could i escape the error msg if there are no files in $DIR
ls: /home/sayantan/test/files/cnt/*: No such file or directory
0
Looking forward for a quick reply
Regards, Newbie... (3 Replies)
I'm creating a bsh shell to unzip a file from one directory into another. The directory that holds the zip files has zip files constantly being added to it, so I am testing it before it does the unzip and more.
Right now my code looks like this:
unzip -tq $ZIP_PATH/$ZIP_NAME >/dev/null
if ... (5 Replies)
I am getting the following upon cat a file which is not present in directory.
"cat: cannot open test1.txt"
I need to process files and I want that this message should be suppressed. thx (5 Replies)