06-21-2010
Hi Guru,
here it returns as 1 only, the value I stored in VAR_COPY_FILE is not appending it... basically I want to append the vaue stored in the variable and after constructed the new variable again need to be executed...
Regarads
Subash
---------- Post updated at 08:04 PM ---------- Previous update was at 07:54 PM ----------
Hi Busy boy,
The problem is $(B) cannot be executed before adding the $(A) returned value,
for ex,
B= test
A=file
testfile = testfile.txt
But dynammically only I can get the values thats why I have for loop.. if we add $(B)$(A) it is returning null for each one.. are you getting my problem?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi !
I have the following situation -
##First variable
variableA=JOB_A
##bunch of other variable
JOB_A_RESTART=cleanupJobA
JOB_B_RESTART=cleanupJobB
JOB_C_RESTART=cleanupJobC
now i need a script which would -
1. take the first variable
2. create a new variable name... (2 Replies)
Discussion started by: hsahay
2 Replies
2. Shell Programming and Scripting
I am needing to create a variable(changing) and assign it a value(changing) ... I am using C-Shell..
Example:
foreach account in ($Accountlist)
set account_connect = "$account/$account_pass"
end
I want to make set account_connect to store various values ? $account_connect did not... (3 Replies)
Discussion started by: shafi2all
3 Replies
3. Shell Programming and Scripting
The scenario is like this :
I need to read records from a file one by one and increment counter1, if a certain field matches with a number say "40"..the script should increment the counter2 and also extract a corresponding field from the same line and adding them one by one and redirecting the the... (5 Replies)
Discussion started by: mady135
5 Replies
4. Shell Programming and Scripting
Okay -- I hope I ask this correctly.
I'm working on my little shell script to write vendor names and aliases to files from user input. If a user choose to add to a file, he can do that as well. I'm using a select loop for this function to list all the possible files the user can choose from.... (7 Replies)
Discussion started by: Straitsfan
7 Replies
5. Shell Programming and Scripting
Hi all,
I am fairly new to unix scripting and will like to know how to dynamically set the name of an environment variable to be used.
We have a .env file where we defined the names and locations of data files, trigger files, directories .... etc
Example of variables defined in .env... (4 Replies)
Discussion started by: Morelia
4 Replies
6. Shell Programming and Scripting
I want to append values to same string variable inside a recursive function that I have .. I do not want to write to any file but use a variable..
Can anyone please help with it? Thanks in advance. (6 Replies)
Discussion started by: Prev
6 Replies
7. Shell Programming and Scripting
I need to copy the log file dynamically and that should run in loop , which means it should pick what ever the latest file is updated in that directory.
I am able to display the list and copy to directly but i have no idea on how to pick the dynamically updated files.
when i use this code, i... (1 Reply)
Discussion started by: johninweb
1 Replies
8. Shell Programming and Scripting
Hi Team!!
Please can anyone tell me why the following line does not work properly?
str3+=$str2
it seems that str3 variable does not keep its value in order to be concatenated in the next iteration! Thus when i print the result of the line above it returns the str2 value
What i want to do is to... (8 Replies)
Discussion started by: paladinaeon
8 Replies
9. Shell Programming and Scripting
Hi,
I am looking for the way to add variable number of spaces between two string. e.g input line is
a ,bb
abc ,bcb
pqr ,bfg
My output should be something like this
a ,bb
abc ,bcb
pqr ,bfg
This text... (9 Replies)
Discussion started by: diehard
9 Replies
10. Shell Programming and Scripting
Hi,
I am trying to print copy percentage completion dynamically by using the script below,
#!/bin/bash
dest_size=0
orig_size=`du -sk $sourcefile | awk '{print $1}'`
while ; do
dest_size=`du -sk $destfile | awk '{print $1}'`
coyp_percentage=`echo "scale=2; $dest_size*100/$orig_size"... (4 Replies)
Discussion started by: Sumanthsv
4 Replies