Hi genius,
Following is the problem.
We have one templete file(input file) where some variables will be used
Example:
Code:
word1 word2 &{word3}
word4 ${word5} word6
And also we have one property file where we define these variables
Example:
Code:
word3= something
Word5= something
Need to read the property file and read the variables there and generate output file
Example:
Code
Hi!
Hi, there
I have a file with tab and space as field separator. I need to assign values to variables then work with them, line by line. The code I wrote only works when each line has only one word.
Hi all! I think someone might be able to solve my problem pretty easily.
I am trying to run a bash loop with 3 variables.
I currently use this message to send e-mails in a script but I would also like to save the output of this code to a file as well while preserving the variables.
For example, I have a file look as follows:
abc
def
ghi
Now, I want to use a Linux shell script to set some variables according to this file. I need the following variables to be set something like:
export abc=abc111
export def=def111
export ghi=ghi111
As you can see that the variable names are retrieved from list file as well. Thanks.
Hello,
Here is my problem using KSH
I have a set of compound variables, let say cmp_var1 cmp_var2
The names of these variables are stored in an indexed array.
How can I access the subfields of these compound variables ?
I tried:
Code:
set -A cmp_varnames=(cmp_var1 cmp_var2)
for cmp in ${cmp_varnames[*]}
do
eval ${${cmp}.field}
done
That does not work, I tried a few other things, no luck.
Th
I would like to loop over variables i and j consecutively,
Code:
{ a = -6.7
b = 7.0
c =0.1
{ for (i = 0; i<=(b-a)/c; i++)
for (j = 1; j<=(b-a)/c; j++)
'$1<=(a+j*c)&&$1>=(a+i*c)' FILENAME > output_j
'{print $2}' output_j > output_j_f
}
I essentially want to print the range of $1 when {i=0,j=1}, {i=1,j=2} etc.
Hi ,
I have input file like below
Code:
Hi this is "vinoth".
Hi happy to work with 'unix'
USA(united states of America)
My script variables are below :
Code:
Dquote=Ộ
Squote=&#$567
Obrac=&^986
Cbrac=&^745
I want to read the variables in my SED command to replace the double quote,single quote,open bracket, and close bracket.
I want output file like
C