1,899 reputation
1411
bio website linuxquestions.org
location
age
visits member for 1 year, 9 months
seen 40 secs ago

linux geek, foodie, health-nut, jack of all trades and master of none :)


1d
comment add groups from external file
and your file format is groupXX SPACE COLON SPACE name?
1d
comment Reading through a csv file
Read my comments above. awk, in your invocation, doesn't know what accountNum is, so ANYTHING matches, which is why you get every book several times (once per account).
1d
comment add groups from external file
And the file-format matches what you put in your question? What does awk '!/EOF/{print $3}' groups.txt print?
1d
comment Reading through a csv file
Are you SURE you invoked the script with the account number you're looking for?
1d
comment Reading through a csv file
You just changed the spec on the fly ... that obviously won't work. Which is the correct format? This isn't CSV, this is, ummm, something else :D
1d
comment add groups from external file
Which user are you running it as? Got any errors?
1d
comment Reading through a csv file
Not on my system with your sample input.
1d
comment add groups from external file
And that's exactly what the 2nd version will do.
1d
comment Reading through a csv file
NF is an awk internal variable, number of field. All up, what we did was define , as field separator, iterate over all fields greater one (your book title), and check whether they match the account number you passed on the command-line. In awk this is commonly done by assigning a value to a variable name with the **-v ** option.
1d
answered add groups from external file
1d
answered Reading through a csv file
1d
comment why not combine iwconfig and wpa_supplicant?
Most likely because still supporting WEP is like putting bluetack on a blown-out truck tyre. It makes no sense.
Jul
18
answered How to provision software across multiple laptops
Jul
17
answered Starting SSH server after VPN starts
Jul
17
comment Starting SSH server after VPN starts
There most likely is, but it will largely depend on your OS/distro. Please edit your question w/ that piece of information.
Jul
16
comment How to Run a script on USB removal?
unix.stackexchange.com/questions/71348/… ... not about a drive, but the basic principle should still apply.
Jul
15
revised Why can't mv preserve permissions when moving between Android SD cards?
not a problem added
Jul
14
answered Why can't mv preserve permissions when moving between Android SD cards?
Jul
14
comment ssh from an unix server to a windows server (running Sysax) fails
Have you tried the sysax support forum?
Jul
14
answered Switching users without the - symbol