Timeline for Accessing array elements within process substitution bash
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 5, 2015 at 11:22 | answer | added | Costas | timeline score: 1 | |
| Apr 5, 2015 at 11:13 | comment | added | jewfro | @Costas. I've tried this: while read line do; while IFS=',' do; read -r UUID protocol username passwd ip_address; done; curl_call="${protocol}://${username}:${passwd}@${ip_address}/report" echo $curl_call; done < test_data.txt This isn't working. It's printing out the whole contents of the file to command line, but the variables are not being assigned properly | |
| Apr 5, 2015 at 11:04 | history | edited | muru | CC BY-SA 3.0 | deleted 10 characters in body |
| Apr 5, 2015 at 10:53 | comment | added | jewfro | Hang on, I had my variables the wrong way round, I think i've got it | |
| Apr 5, 2015 at 10:38 | comment | added | jewfro | How to you put code in comments? | |
| Apr 5, 2015 at 10:36 | comment | added | jewfro | @Costas how do I integrate that into my code, I'm only managing to get the first line to read in. while read -u 3 line do while IFS=','; do read -r UUID protocol username passwd ip_address ........ done done ? | |
| Apr 5, 2015 at 10:13 | comment | added | Costas | while IFS=',' read -r UUID protocol username passwd ip_address ; do ... done < test_data.txt | |
| Apr 5, 2015 at 10:11 | comment | added | Cyrus | Sorry, you have not accepted any answer in the past. See: What should I do when someone answers my question? | |
| Apr 5, 2015 at 10:01 | history | asked | jewfro | CC BY-SA 3.0 |