10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
Can you please help me with the below.
#!/bin/bash
ARR="No Differences In Stage Between HASH_TOTALS & HASH_TOTALS_COMP For UNINUM:0722075 PROVIDER:5 EXTRACT_DT:30-SEP-12 VER_NUM:1"
ARR="No Differences In Stage Between HASH_TOTALS & HASH_TOTALS_COMP For UNINUM:0722075 PROVIDER:5... (14 Replies)
Discussion started by: Ariean
14 Replies
2. Shell Programming and Scripting
Hi, all
suppose I have following myfile (delimited by tab)
aa bb
cc dd
ee ffand I have following awk command:
awk 'BEGIN{FS="\t"}{AwkArrayVar_1=$1;AwkArrayVar_2=$2};END{for(i=0; i<NR; i++) print i, AwkArrayVar_1, AwkArrayVar_2,}' myfileMy question is: how can I assign the awk array... (7 Replies)
Discussion started by: littlewenwen
7 Replies
3. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
4. Shell Programming and Scripting
Hi friends,
I'm having a bit of a problem using shell variable in an awk if statement.
Please note that i'm using -v option as listed in many forums but I still don't get it working. Here's my code. Kindly help as I've gone crazy trying to work this out :wall:
#!/bin/bash -xv
... (4 Replies)
Discussion started by: vishwas.s
4 Replies
5. Shell Programming and Scripting
i have an array call ignore. it is set up
ignore=34th56
ignore=re45ty
ignore=rt45yu
.
.
ignore=rthg34
n is a variable. I have another variable that i read from a different file. It is $2 and it is working the way i expect. array ignore read and print correct values.
in the below if... (2 Replies)
Discussion started by: usustarr
2 Replies
6. Shell Programming and Scripting
Hi all,
i have a data array as follows.
array=ertfgj2345
array=456ttygkd
.
.
.
array=errdjt3235
so number or elements in the array can varies depending on how big the data input is.
now i have a variable, and it is $1 (there are $2, $3 and so on, i am only interested in $1).
... (9 Replies)
Discussion started by: usustarr
9 Replies
7. Shell Programming and Scripting
hi all i am trying to save an awk value into an array in bash:
total=`awk '{sum+=$3} END {print sum}' "$count".txt"`
((count++))
the above statement is in a while loop..
$count is to keep track of file numbers (1.txt,2.txt,3.txt,etc.)
i get the following error:
./lines1:... (1 Reply)
Discussion started by: npatwardhan
1 Replies
8. 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
9. Shell Programming and Scripting
Like class loader in java, can we make a function loader in shell script, for this can someone throw some light on how internally bash runs a shell script , what happenes in runtime ...
thanks in advance.. (1 Reply)
Discussion started by: mpsc_sela
1 Replies
10. Shell Programming and Scripting
Hi,
I made a small awk program just to test array variables.
I couldn't find anything wrong with it.
But it doesn't give out valid numbers.( just 0.00 )
Do you see any problem that I didn't see?
Thanks in advance!
Here is the program:
##################################
BEGIN {
FS =... (4 Replies)
Discussion started by: whatisthis
4 Replies