10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I have a file "abc.dat" in below format:
FILE_PATH||||$F_PATH
TABLE_LIST||||a|b|c
SYST_NM||||${SRC_SYST}
Now I am trying to read the above file and want to print the value for above dollar variables F_PATH and SRC_SYST. The problem is it's reading the dollar variables as... (5 Replies)
Discussion started by: abcabc1103
5 Replies
2. Shell Programming and Scripting
Hi All,
Need a help. I am just learning Shell scripting. Need a requirement like to attach variable to array values. Value of from is AF and to is AD.
froml=$(echo $from | tr '' '')
tol=$(echo $to | tr '' '')
Schemas=(AWQM WFCONTROLLER PROVCO PRISM)
for s in "${Schemas}"
do
... (3 Replies)
Discussion started by: pvmanikandan
3 Replies
3. Shell Programming and Scripting
I tried to use variable inside an array variable, but its not working as expected.:wall:
ENV1=123
ENV1=789
ENV1=120
ENV2=567
if
then
name=ENV1
echo "${name}"
echo "${name}"
echo "${name}"
else
name=ENV1
echo "${name}"
fi
Output: ./val.sh 1
123 (2 Replies)
Discussion started by: Jayavinoth
2 Replies
4. Shell Programming and Scripting
I am new to ksh scripting, specially array. How do i get values from an array and set the value as variable and pass those variables to the different functions??
someone taught me how to get input from a file with have columns i need to read, but now i doesnt know how to set those value to be a... (7 Replies)
Discussion started by: gavin_L
7 Replies
5. Shell Programming and Scripting
Hi,
I need to update rows in a table based on the values in an array variable.
code is :
while read line
do
error_msg="$(echo $line)"
index=`expr $index+1`
done <"logs/$ffile"
rows_count=${#error_msg
}
i=0
while
do
echo "error msgs is... (2 Replies)
Discussion started by: RP09
2 Replies
6. Shell Programming and Scripting
Am using a find command in my script .The output may be one or more. I need to store those values in a array and need to access those. Am unable to find the solution . Any help on this will be helpful.
if
< code>
else a=<find command output which gives the file name either 1 or more>
if 1... (1 Reply)
Discussion started by: rogerben
1 Replies
7. Shell Programming and Scripting
Dear All,
I have been trying to do a simple task of extracting 2 fields from the file (3 rows) and store it in an array variable. I tried with:
#! /bin/bash
ch=`cut -f10 tmp.txt`
counter=0
for p in $pid
do
c=${ch}
echo "$c ..$counter"
counter=$((counter+1))... (2 Replies)
Discussion started by: ezhil01
2 Replies
8. Shell Programming and Scripting
#ksh
Here is my code:
ERRORLIST="43032 12001 12002 12003 12004 34019 49015 49016 49017 49018 49024 49025 49026 58004 72003 12005 12006 12007 12008 12011 12012 16024 16023"
for ERROR in ${ERRORLIST}
do
awk -v l="$lastdate" '/^....-..-../&&$0>l{d=$0}d&&/Error: '"${ERROR}"'/{print... (3 Replies)
Discussion started by: k1ko
3 Replies
9. Shell Programming and Scripting
i have these values inside variable $blah
BUNGA TERATAI 3 5055 ITH 1 0 0 0 1 1
JADE TRADER 143W ITH 4 0 0 0 4 4
MOL SPLENDOR 0307A ITH 3 0 0 0 3 3
so how do I split them into array with the... (4 Replies)
Discussion started by: finalight
4 Replies
10. Shell Programming and Scripting
i'm trying to do this (in bash darwin);
echo "give me some words: "
read a
c=2 # this is get by other ways
echo $a | awk '{print $c}' # i want to print the column given
# by de $c variable
if there is someone understand what i pretend... (3 Replies)
Discussion started by: Tártaro
3 Replies