10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Say I have something like this to try and build a parameter string:
OPT1="This is my Option";
OPT2="/folder/file";
PARMS="-u me -J \"$OPT1\" -g \"$OPT2\"";
./script.ksh -n 1 $PARMS;
./script.ksh -n 2 $PARMS;
./script.ksh -n 3 $PARMS;
./script.ksh -n 4 $PARMS;
But this doesn't work. ... (2 Replies)
Discussion started by: Devyn
2 Replies
2. Shell Programming and Scripting
Hi All,
I have below variable,
xyz=\$AI_XFR
Now, if you will run the below command
=> echo $xyz
$AI_XFR
It is returning hardcoded string value.
Whereas in environment, there is value in it. Like below:
=> echo $AI_XFR
/home/aditya/sandbox/xfr/
I need to resolve this... (4 Replies)
Discussion started by: adgangwar
4 Replies
3. Shell Programming and Scripting
hi all,
i have a parameter file of following format, i want a method which can get the value of specific parameter.
parameter file format:
<Parameter Name="FileLocationWindows">
<Description>
The directory location of the logger file.
... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies
4. Shell Programming and Scripting
Hi,
In my script, there is a variable as below
TME=`date +%H`
I want to take this TME value into another variable called TME_PAR which i can use outside of the current script and this TME_PAR is already present in my home_dir and i wrote below line of code
$home_dir/$TME_PAR=`echo... (1 Reply)
Discussion started by: JSKOBS
1 Replies
5. Shell Programming and Scripting
Hello again :)
Am currently trying to write a function which will delete a record from a file.
The code currently looks as such:
function deleteRecord() {
clear
read -p "Please enter the ID of the record you wish to remove: " strID
... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies
6. Shell Programming and Scripting
HI all,
I have a parameter file with entries like
$$Name =Abhinav
$$CUTOFF_DATE = 11/11/2209
I am reading a variable from this file using a awk command like :
var2=`awk -F"" "/CUTOFF_DATE/{f=$1;}{print f;}" InputFIleName`
but facing an error like
awk: cmd. line:1:... (3 Replies)
Discussion started by: abhinav192
3 Replies
7. Shell Programming and Scripting
Hi,
I have two bash shell scripts:
test:
rrdhcp78-120:test_data msb65$ cat ~/bin/test
#!/bin/sh
array1=()
echo 'elements in array1:' ${#array1}
~/bin/test2 $array1
test2:
rrdhcp78-120:test_data msb65$ cat ~/bin/test2
#!/bin/sh
array2=${1} (5 Replies)
Discussion started by: msb65
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Is it possible to use a variable as a fieldname parameter for the cut command. I am trying to extract fields from a variable. Say that I want to cut the fields 1,3,5,7,9, etc, but I don't know how many fields that the variable will have i.e. could be 100 or more. I thought that I could use... (3 Replies)
Discussion started by: Knotty
3 Replies
9. Shell Programming and Scripting
Hi,
I have a parameter file and it contains following items
$ cat TransactionParams
From_Date_Parm=2005-02-25
To_Date_Parm=2005-05-25
Extract_Root_Parm=/detld1/etl/ascential/Ascential/DataStage/Projects/CTI_London/IAM
Extract_Type_Parm=Transaction
EDW_Database_Parm=hdw_erks... (2 Replies)
Discussion started by: gopskrish
2 Replies
10. Shell Programming and Scripting
Hello All,
I have a script that will email out if the email address is specified as parameter 1.
I am using ksh, and then tried the following :
email=$1
Following did not work, I am getting error
test -z $email
test ${email:=" ") -eq " "
test -n $email
test ${?email}
What... (4 Replies)
Discussion started by: negixx
4 Replies