I am trying to assign a awk array for further processing later in the script. I can't seem to figure it out. If someone could look at this and help me, I would very much appreciate it.
Thanks in Advance.
for ( x = 1 ; x <= Var ; x++ ) {
if ( x in varr ) {
... (2 Replies)
Hi,
i want awk to read a file and place it's content into two arrays. When trying to read these arrays with a "for a in ${source_path} "-Loop it gives the right result. But when trying to access directly (/bin/echo ${source_path}) it doesn't work.
I read "all "the awk threads in this forum and... (6 Replies)
Is there a way to retain the awk array in the shell.
My requirement
file a.txt
A B Count
10 1 25
10 2 20
10 3 21
11 1 20
11 2 22
12 2 40
12 3 15
A and B are my variables and count... (6 Replies)
I want to ask the user to enter an X amount of file names. I want to put those names into an array and then loop back through them to verify they are in the directory. 1st- How would I assign the value to an array and what is the correct syntax. 2nd- how would i reference that array after I... (3 Replies)
file.txt : is delimiter:
abc:def:ghi
jkl:mno: pqr
123:456:789
if I do the cut command, and cut the first column, and echo it out
I will get the output:
abc
jkl
123
How can I assign the column of text that I've cut into Array?
e.g If I were to echo array array it will output as:... (9 Replies)
Hi,
I have a piece of code as follows:
i=0
while read LINE
do
var = "$LINE"
i=$((i+1))
echo "${var}"
done < file
I want to assign value to the array var.
However, when i execute the script i get a error.
Please can you help me know what i am missing.
I ultimately want to... (2 Replies)
Hi all ,
I have a string like para1#para2#para3
i want to assign para1 as first element para2 as second and so on
i tried
IFS=#
set -A array para1#para2#para3
echo ${array}
para1 para2 para3
i want echo ${array}
para1 (2 Replies)
Hi,
I have a 10*10 two dimensional array. How do I assign value to all it's 100 elements at once? I don't want to open two for loops and assign one by one.
Thanks,
Shuri (1 Reply)