04-21-2020
Hi
You define: SOURCEONEACTUAL="a" and SOURCEONENEW="b", but not $SOURCEONEACTUAL116 that you try to ls.
You do delete a script116* file, yet you attempt to write a script.* file.
I belive that script.source.file still has content from you 'earlier tries'.
Because as of now, it (ls) should fail due to missing pattern (filename/s).
Try to use set -x to start, and set +x to end debuging.
Hope this helps
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#SD=source dir TD= target dir
SD="$/amddev/app01/manoj/new/scripts/old"
TD="$/amddev/app01/manoj/new/scripts/new"
EXT="$*.txt"
for i in `ls -F "$SD"/*"$EXT"|grep -v /$` do
mv "$SD" "$TD"
if
then
echo "$i" successfully moved
echo Manoj successfully..1 ( here i... (8 Replies)
Discussion started by: manojkarthi
8 Replies
2. Shell Programming and Scripting
hi ..
I have automate some process on unix through sehll script .
but i don't know there is some problem in scripts, some time shell script works and some time it fails. so my query is that "Why shell script fails some times?"
thanks (4 Replies)
Discussion started by: tahir23
4 Replies
3. Shell Programming and Scripting
hi ,
i m trying to run a shell script automatically , some time it works fine but some time it fails , what could be the problem .
If anybody have an idea about this problem then reply .
Thanks in advacne (4 Replies)
Discussion started by: tahir23
4 Replies
4. Shell Programming and Scripting
Hi ,
I need a shell script which basicaly moves all the files from one folder say folder x to folder y and once they are moved to folder y a datetimestamp should be attached to there name
for ex
file a should be moved to y folder and renamed as a_20081015 (1 Reply)
Discussion started by: viv1
1 Replies
5. Shell Programming and Scripting
Hi Experts,
I have a "Source" folder which may contain some files. I need a shell script which should move all files which are older than 3 days to "Archive" folder.
Thanks in Advance... (4 Replies)
Discussion started by: phani333
4 Replies
6. Shell Programming and Scripting
All,
I executing a perl script and shell script from a master shell script. i will execute the perl script first and have to execute the shell script after the completion of perl execution. Below is the code i use for it,
script_root='/dev/scripts'
/usr/bin/perl -S $script_root/test.pl;... (5 Replies)
Discussion started by: vel4ever
5 Replies
7. Shell Programming and Scripting
HI
cd ${back_home}
if above back_home does not exist, then script shoul exit. Please let us know how to do that (7 Replies)
Discussion started by: buzzme
7 Replies
8. Shell Programming and Scripting
Hey guys,
ive been working on this for about 2hrs now - without any solution.
At first I need to say I dont have skills in linux bash scripting, but I tried to use some codesnippets and manuals from google.
What I want to do:
I have different folders including 2 different filestypes with... (15 Replies)
Discussion started by: peter1337
15 Replies
9. UNIX for Beginners Questions & Answers
Hi,
i am new here let me say HI for all.
now i have a question please:
i am sending one command to my machine to create 3 names.
if one of the names exists then the box return error message that already have the name but will continue to create the rests.
How i can break the command and... (7 Replies)
Discussion started by: Amiri
7 Replies
10. Shell Programming and Scripting
Array declared in shell script works for AiX 6.1 and above but fails in Linux CentOS 7.
I have the below code for Array in my shell script that runs fine on AiX systems.
Note: on AiX it uses ksh shell while on Linux it uses non ksh shell.
set -A filelist
However, i now wish to use the... (3 Replies)
Discussion started by: mohtashims
3 Replies
source(n) Tcl Built-In Commands source(n)
__________________________________________________________________________________________________________________________________________________
NAME
source - Evaluate a file or resource as a Tcl script
SYNOPSIS
source fileName
source -encoding encodingName fileName |
_________________________________________________________________
DESCRIPTION
This command takes the contents of the specified file or resource and passes it to the Tcl interpreter as a text script. The return value
from source is the return value of the last command executed in the script. If an error occurs in evaluating the contents of the script
then the source command will return that error. If a return command is invoked from within the script then the remainder of the file will
be skipped and the source command will return normally with the result from the return command.
The end-of-file character for files is "32" (^Z) for all platforms. The source command will read files up to this character. This
restriction does not exist for the read or gets commands, allowing for files containing code and data segments (scripted documents). If
you require a "^Z" in code for string comparison, you can use "