Sponsored Content
Top Forums Shell Programming and Scripting Error copying file using wildcard Post 302989755 by mohtashims on Wednesday 18th of January 2017 02:47:56 AM
Old 01-18-2017
RedHat Error copying file using wildcard

Hi,

Code:
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.sh

more test.sh
Code:
cd log01
pwd
cp ../*.db .

When i run the test.sh i get the below output / error.

Output:
Code:
/web/myf/log01
cp: cannot stat `../*.db': No such file or directory

I was expecting /web/myf/mykey.db to be copied to /web/myf/log01/mykey.db

Can you please tell me whats wrong with my code ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find wildcard .shtml files in wildcard directories and removing them- How's it done?

I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days... The structure of the paths are like this: /home/domains/www.domain2.com/tgp/ /home/domains/www.domain3.com/tgp/... (1 Reply)
Discussion started by: Neko
1 Replies

2. UNIX for Dummies Questions & Answers

copying to multiple directories using wildcard

Can we copy a file to multiple directories using a single command line , i tried with * didnt work for me cp /tmp/a.kool /tmp/folder/*/keys/ I am tryn to copy a.kool file to all keys folder in /tmp folder. is something i am missing ? (4 Replies)
Discussion started by: logic0
4 Replies

3. UNIX for Dummies Questions & Answers

No such file or directory error while copying files

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

4. UNIX for Dummies Questions & Answers

Tail command with wildcard file name

Please help with the following command tail -f /appdata/logs/alert_audit517.txt | grep "Sep 02" The problem I have is with the file name "alert_audit517.txt". The 3 digit number at the end of the file name changes, so I need the file name to use a wildcard. Ive tried alert_audit***.txt, but... (5 Replies)
Discussion started by: robertson1995
5 Replies

5. Shell Programming and Scripting

How to suppress the error while copying the file

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)
Discussion started by: arukuku
4 Replies

6. Shell Programming and Scripting

Search a wildcard text in a file

Hi, I have a file(report.txt) that contains : 0 1 chk_uncov_data_assert 776 chk_uncov_data_assert : assert property (chk_uncov_data) 1 0 chk_data_assert 772 chk_data_assert : assert property (chk_data) 1 0 chk_data_cover ... (8 Replies)
Discussion started by: Anamika08
8 Replies

7. AIX

Error while copying file on 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

8. UNIX for Dummies Questions & Answers

scp error when using wildcard

Hello, Every time my script runs I want it to go and copy all the files from a remote server directory to my local directory. Whenever I have files in the remote directory the command scp -p $proxy_user@$proxy_server:"$remote_dir/*" ${local_dir} executes with 0; when I have no files in the... (2 Replies)
Discussion started by: rdogadin
2 Replies

9. UNIX for Dummies Questions & Answers

Wildcard in file names

I know this is very basic and looks strange to me . -bash-3.2$ wc -l *. Result: 51 test.bad Since my third range after dot is A-Z(upper), how it matched the d( Lower)? i was in an understanding that the above code would not fetch any result unless i have a file with 3 char extension... (4 Replies)
Discussion started by: saravana.sarak
4 Replies

10. Shell Programming and Scripting

Unable to grep using wildcard in a file.

I wish to check if my file has a line that does not start with '#' and has 1. Listen and 2. 443 echo "Listen 443" > test.out grep 'Listen *443' test.out | grep -v '#' Listen 443 The above worked fine but when the entry changes to the below the grep fails... (2 Replies)
Discussion started by: mohtashims
2 Replies
DIFF(3) 						User Contributed Perl Documentation						   DIFF(3)

NAME
PDL::GSL::DIFF - PDL interface to numerical differentiation routines in GSL DESCRIPTION
This is an interface to the numerical differentiation package present in the GNU Scientific Library. SYNOPSIS
use PDL; use PDL::GSL::DIFF; my $x0 = 3.3; my @res = gsldiff(&myfunction,$x0); # same as above: @res = gsldiff(&myfunction,$x0,{Method => 'central'}); # use only values greater than $x0 to get the derivative @res = gsldiff(&myfunction,$x0,{Method => 'forward'}); # use only values smaller than $x0 to get the derivative @res = gsldiff(&myfunction,$x0,{Method => 'backward'}); sub myfunction{ my ($x) = @_; return $x**2; } FUNCTIONS
gsldiff() This functions serves as an interface to the three differentiation functions present in GSL: gsl_diff_central, gsl_diff_backward and gsl_diff_forward. To compute the derivative, the central method uses values greater and smaller than the point at which the derivative is to be evaluated, while backward and forward use only values smaller and greater respectively. gsldiff() returns both the derivative and an absolute error estimate. The default method is 'central', others can be specified by passing an option. Please check the GSL documentation for more information. Usage: ($d,$abserr) = gsldiff($function_ref,$x,{Method => $method}); Example: #derivative using default method ('central') ($d,$abserr) = gsldiff(&myf,3.3); #same as above with method set explicitly ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'central'}); #using backward & forward methods ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'backward'}); ($d,$abserr) = gsldiff(&myf,3.3,{Method => 'forward'}); sub myf{ my ($x) = @_; return exp($x); } BUGS
Feedback is welcome. Log bugs in the PDL bug database (the database is always linked from http://pdl.perl.org). SEE ALSO
PDL The GSL documentation is online at http://sources.redhat.com/gsl/ref/gsl-ref_toc.html AUTHOR
This file copyright (C) 2003 Andres Jordan <andresj@physics.rutgers.edu> All rights reserved. There is no warranty. You are allowed to redistribute this software documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file. The GSL differentiation routines were written by David Morrison. FUNCTIONS
diff_central Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_central does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. diff_backward Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_backward does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. diff_forward Signature: (double x(); double [o] res(); double [o] abserr(); SV* funcion) info not available diff_forward does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. perl v5.12.1 2010-07-05 DIFF(3)
All times are GMT -4. The time now is 06:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy