02-07-2012
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: helper2007
5 Replies
2. Shell Programming and Scripting
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)
Discussion started by: skwyer
5 Replies
3. Shell Programming and Scripting
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)
Discussion started by: newbie07
3 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: srinirsr
6 Replies
5. Shell Programming and Scripting
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)
Discussion started by: arukuku
7 Replies
6. Shell Programming and Scripting
How can I suppress a error message being given by awk command in bash shell? (2 Replies)
Discussion started by: Prachi Gupta
2 Replies
7. Shell Programming and Scripting
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)
Discussion started by: angshuman
16 Replies
8. AIX
/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)
Discussion started by: Vishal_dba
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: DanielDD
5 Replies
10. Shell Programming and Scripting
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)
Discussion started by: mohtashims
5 Replies
LEARN ABOUT DEBIAN
dh-exec-install
DH-EXEC-INSTALL(1) dh-exec DH-EXEC-INSTALL(1)
NAME
dh-exec-install - Install (and possibly rename) files.
SYNOPSIS
#! /usr/bin/dh-exec
debian/default.conf => /etc/my-package/start.conf
usr/bin/*
DESCRIPTION
Being a sub-command of dh-exec(1), this program must not be ran directly, but through dh-exec, which automatically runs all available
sub-commands if run bare; or explicitly with dh-exec --with=install.
It is meant to be used for dh_install(1) files, and those alone. If it finds that its input is not such a file, it will do nothing, but
echo back the contents.
The purpose of the program is to extend dh_install(1)'s functionality, by allowing to specify a destination filename.
This can be accomplished by a special syntax: the " => " mark between a source and a destination means that the source file should be
installed with the specified destination name.
For obvious reasons, the source must not be a wildcard, and the destination in this case must be a file, and not a directory.
All other non-comment lines are left alone.
RESTRICTIONS
Due to the way executable scripts are called from debhelper(1), there is no way to know what options were used for the original
dh_install(1). This means, that the --sourcedir option of dh_install(1) will not work correctly when dh-exec-install is in use.
IMPLEMENTATION
Internally, the renaming happens by creating a temporary directory under debian/tmp/, and copying (or moving, if the source was under
debian/tmp/ to begin with) the file there, with the new name.
This is done this way to allow dh_install(1) to do the real copying, and allow its options to continue working, even when renaming is
involved.
The temporary directory is put under debian/tmp so that it will be cleaned by dh_prep(1) when the clean target gets to run. Thus, no extra
code is needed anywhere to clean up the renamed files.
ENVIRONMENT
DH_EXEC_SCRIPTDIR
Indicates which directory the command-specific scripts should be sought for. If not specified, scripts will be searched for in
/usr/share/dh-exec/.
FILES
$DH_EXEC_SCRIPTDIR/dh-exec-install-*
The various scripts for the higher-level program.
SEE ALSO
debhelper(1), dh-exec(1), dh_install(1)
AUTHOR
dh-exec-install is copyright (C) 2011-2012 by Gergely Nagy <algernon@madhouse-project.org>.
2012-05-03 DH-EXEC-INSTALL(1)