10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
We have a requirement of picking nth position value by using cut command. value would be delimited by any symbols. We have to pass delimited value and postition to get the value in a string.
ex.
echo "A,B,C,D,E" |cut -d "," -f3
echo "A|B|C|D|E"|cut -d "|" -f2
Kindly frame the... (5 Replies)
Discussion started by: KK230689
5 Replies
2. Shell Programming and Scripting
Hi Guys,
I am using a function to replace the values dynamically to frame sql query by reading a file. My file will have column names like
file.txt
col_1
col_2
expected output:
select id,col_1,col_2 from (
select a.id,
a.col_1,
rank() over (ORDER BY cast(a.col_1 AS double)... (5 Replies)
Discussion started by: Master_Mind
5 Replies
3. Shell Programming and Scripting
Hi,
I am trying to incorporate 2 functions into my `awk` command.
I want to lower case Column 2 (which is essentially the same information in Col1, except in Col1 I want to maintain the capitalization) and I want to count from 0-N that begins and ends with the start of certain markers that I... (6 Replies)
Discussion started by: owwow14
6 Replies
4. Shell Programming and Scripting
I have a small program which needs to pass variable dynamically to form the name of a second variable whose value wil be passed on to a third variable.
***************** Program Start ******************
LOC1=/loc1
PAT1IN=/loc2
PAT2IN=/loc3
if ; then
for fpattern in `cat... (5 Replies)
Discussion started by: Cyril Jos
5 Replies
5. Shell Programming and Scripting
Hi all,
We have requirement to generate load timing based on subject areas HOUSEHOLD, BANKING and TRADING. These values are stored in an array SUB_ARR
SUB_ARR=("HOUSEHOLD" "BANKING" "TRADING")
Based on indicator files produced while processing data for each type, we need to get the stats (using... (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies
6. Shell Programming and Scripting
hi
i have an input file in which there are diffrent values for xxxx,yyyyyy,zzzzzzz how can i arrange the dynamic values of x,y&z in a row.
input file:
xxxxx 1
yyyyyy 4
yyyyyy 5
zzzzzzzz 7
yyyyyy 13
zzzzzzzz 7
zzzzzzzz 6
yyyyyy 14
yyyyyy 12
zzzzzzzz 4
yyyyyy 4
yyyyyy 5
yyyyyy 6... (6 Replies)
Discussion started by: dodasajan
6 Replies
7. Shell Programming and Scripting
I found one post in another site with a solution for my problem
the below solution should explain what I want.
#!/bin/sh
first="one"
second="two"
third="three"
myvar="first"
echo ${!myvar}
But this gives error 'bad substitution'
System info
SunOS sundev2 5.9... (3 Replies)
Discussion started by: johnbach
3 Replies
8. Shell Programming and Scripting
How do I assign values to reference variables?
I am assigning a variable name to --> $user_var
Then I am trying to change its underlying variable value by
$((user_var))=$user_value .. its failing,,
Please let me know if there is a way to do this dynamically..
FileA.props... (5 Replies)
Discussion started by: kchinnam
5 Replies
9. Shell Programming and Scripting
Hello,
Can somebody please give me a snippet for the below requirement.
I want to assign the values separeted by a comma to be assigned to a dynamic array.
If I give an input (read statement) like abc1,abc2,abc3,abc4,abc5, all these strings abc* should be assigned to an array like below... (2 Replies)
Discussion started by: suneelj
2 Replies
10. Shell Programming and Scripting
Hi,
I am stuck with extracting values by combining 2 dynamically extracted values.
The code goes like this
#!/usr/bin/ksh
ID1="abcd"
i=1 #this is a dynamic value and keeps on changing
b="ID" #this is static
now i want the value of ID1 variable.
like echo $b$i
But echo... (1 Reply)
Discussion started by: chaitanyapn
1 Replies