10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
awk -F'\t' -v OFS='\t' '
{ if($2 in arr) {
#print "Sahi", NR,arr
for(k=2;k<=NF;k++){
# sum]+=$2
}
}
else {
arr=NR
#print "awk",NR
for (k=3;k<=NF ; k++){
sum=$k
}
}
} (7 Replies)
Discussion started by: genome
7 Replies
2. Shell Programming and Scripting
I have two files:
file-1 is a list of number of interfaces in the switch and file-2 have VLAN-ID , VLAN-NAME , Interface belong to that VLAN like this:
file-1:
1/1
1/2
1/3
1/4
1/5
.
.
file-2:
1,"vlan-wifi",1/1,1/7,1/8 (9 Replies)
Discussion started by: SULTAN01
9 Replies
3. Shell Programming and Scripting
Hi Experts,
I'm a newbie.....multidimensional arrays in shell scripts is possible???
If so, can anyone guide me with an example.....and also can anyone tell me, how we can create a table like ouput format in shell script....the output should look like this one:
1 2 3 4 5 6
6 5 4 3... (4 Replies)
Discussion started by: kritibalu
4 Replies
4. Programming
My language is C++. I have a multidimensional vector that I would like to sort by a specific "cell" or "field" within the main vector. Does anyone have any information on how to do this? I have searched all over the internet and every reference manual I can find. So far I have found very little to... (2 Replies)
Discussion started by: sepoto
2 Replies
5. Shell Programming and Scripting
Hi,
I was trying to process a file with the help of awk. I want to first display all the rows that contains 01 and at the end of processing I have to print some portion of all the lines. like below.
Output expected: (2 Replies)
Discussion started by: ahmedwaseem2000
2 Replies
6. Shell Programming and Scripting
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies
7. Shell Programming and Scripting
In a single dim. awk array, we can use :
<index> in <array name>
to determine whether a particualar index exists in the array or not.
Is there a way to achieve this in a awk multi dim. array ? (4 Replies)
Discussion started by: sinpeak
4 Replies
8. Shell Programming and Scripting
Hello All,
Here is my input file content and i am trying to write an awk file that produces the output as shown below. i tried with my little knowledge but was not successful.
Input File content:
ID COL1 COL2 COL3
1002 1 val21 val31
1002 2 val22 val32
1002 3 val23 val33... (2 Replies)
Discussion started by: forumthreads
2 Replies
9. Shell Programming and Scripting
Hello Experts,,
Can anybody give me a brief idea what is following bold letter statement is for!!
what is the term called so that I can google for it..
It seems to be an array inside another array..
awk'
/TXADDR/ { txaddr=$NF } ##understood
/TXDATA/ { txdata]=$NF... (1 Reply)
Discussion started by: user_prady
1 Replies
10. Shell Programming and Scripting
I have a file that's logically in the form of a multidimensional array with an unknown number of records in the file. The file looks like this:
name1
data1
name2
data2
name3
data3
...
nameN
dataN
How do I load this file into an array for processing, while... (2 Replies)
Discussion started by: leslie02
2 Replies