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)
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)
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)
Hi,
I need to copy files from one dir to another dir.
The list of filesnames to be moved are in a file called files2cp.log
Script:
#!/bin/ksh
exec 0</home/amdocs/files2cp.log
while read LINE
do
cp -i /iccs33/attach/"$LINE" /iccs30/attach/"$LINE"
done
The output is "No such... (6 Replies)
How to supress the file name when we check for disk space ?
I used this command :
du -ks /home/dir1/dir2/file.csv
it returns
13 /home/dir1/dir2/file.csv
Please explain the options too (7 Replies)
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)
/oragriddb_01/app/oracle/product/11203> ct_14_2012_22_58_58/files/lib/libdbcfg11.so /oragrid_01/Grid_11203/lib/libdbcfg11.so <
cp: /oragrid_01/Grid_11203/lib/libdbcfg11.so: Cannot open or remove a file containing a running program.
Best regards,
Vishal (2 Replies)
Hallo,
I wrote some script:
95% of the script's output consists of error messages like "mkdir: cannot create directory ‘final': File exists
Exit 1" and "rm: No match. Exit 1".
These messages are not harmful at all, but they make the output almost unreadable.
How can I get rid of... (5 Replies)
Hi,
cd /web/myf
ls -ltr
-rwxr-x--- 1 user1 Admin 17 Oct 7 15:53 mykey.db
-rwxr-x--- 1 user1 Admin 21 Oct 7 15:53 test.shmore test.sh
cd log01
pwd
cp ../*.db .When i run the test.sh i get the below output / error.
Output:
/web/myf/log01
cp: cannot stat `../*.db': No such file... (5 Replies)