hmmmm.... I figured it out.
In the original code
cc = 0
should have been
cc = 1
the test file i used was only a single line (i thought it was more.. should have opened it to check) and when I tested the array from 1 to 10, it returned all empty (because it was in array[0]).
Split starts...
The code posted above would run without error but when I would call the array, every element was null.
I figured out the solution after much trial and error and coming across a similar yet unrelated post on here....
file = "file_name"
# Take each line from file and store in temp array...
Hi, I have a fairly lengthy awk program I am writing for my personal media server.(unraid)
The awk program is contained completely within a BEGIN{} and is run as a part of a web interface.
I need a loop writen in awk for within BEGIN{} that will take each line from an input file and store it...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.