You say that:
and:
write a diagnostic message saying that mv can't stat ABC_*
and then you say that:
works on the command line, but not in your script.
Do you not see that abc_* is not the same as ABC_*.dat, / is not the same as \, and you still haven't told us what the value of ${DATA_DIR} is nor what the value of ${ARCHIVE} is?
I can assure you that you won't get a diagnostic about not being able to stat a file named ABC_* from an attempt to move a file named ABC_*.dat.
What operating system are you using? The confusion between / and \ makes me wonder if you're running on Windows instead of on a UNIX or Linux platform.
Your confusion is due to typing issue. Let me clearly explain you.
1.) I try to move files from one directory to another, so used a below command,
The Value for DATAA_DIR and ARCHIVE are,
2.) If i run the above mv command inside my shellscript, im getting the error like
But if i run the same command (i.e:
) outside the shell script, then it works fine.
3.) Instead of using '*' if i used the complete file name (i.e: ABC_20120103) its working fine inside the shell script itself. But i don't want to do that, since n number of files with different date format is present in the directory. So i want to move all the files from data directory to archive directory.
I hope now you are clear with my issue.
Thanks,
Bopty
Last edited by Scrutinizer; 01-03-2013 at 08:17 AM..
Reason: code tags
cat << EOF | telnet alt1.aspmx.l.google.com 25
HELO verify-email.org
MAIL FROM: <check@verify-email.org>
RCPT TO: <test@gmail.com>
quit
EOF
Hello, I'm trying to get the result of that execution, and can not see the result or bring it to a txt ... the direct command in ssh running the result... (5 Replies)
hi all,
i need the shell script for he below requirement
i had the input file as
a_20121217_035120( frmat is a_date_hhmmss)
a_20121217_035128
a_20121217_035456
a_20121217_035767
a_20121217_035178
a_20121217_035189
a_20121217_035220
my output should be
a_20121217_035456... (0 Replies)
Hello. I am a novince at writing shell scripts but here is the question. I have to write a shell script that does the following:
Once executed via crontab, the script should do the following:
a. get date/time stamp in for format 10-MAR-05 and
b. execute shell script my_script.sh (which... (2 Replies)
hI,
Pls consider the following shell script
#!/bin/csh -f
sqlplus tkyte/tkyte <<"EOF" > tmp.csh
set serveroutput on
declare
a number:=5;
begin
dbms_output.put_line( 'a:='||a );
end;
/
spool off
"EOF"
The above script does the followin
1)it connects... (1 Reply)
Iam new to shellscript.
1)How to strart QUERYMANAGER using shellscript.
2)How to put and get messages in MQSeries using shellscripts.
3)iam using local queues .
Thanks lot. (0 Replies)
Folks;
on a unix server I have a mapping file which holds a list mountpoints of all databases and their mountpoints. tab delimited or colon deliminted..I needed to copy the datafiles from the pristine mountpoints to test's mountpoints in this case. I needed to do this by passing sid name using... (18 Replies)
Can I do something like this from a shellscript ?:
ftp 12.34.56.78 <<!
username
password
put a.c
bye
!
It does not go through as the login fails.
Is there any alternative to do the above requirement?
Thanks in advance.
Gowrish (3 Replies)