Skip to main content

Timeline for While Read Line - Syntax Question

Current License: CC BY-SA 4.0

13 events
when toggle format what by license comment
Feb 4, 2019 at 18:48 comment added bbelden Even with those suggestions I am still having the same output. Please see my edits above for more details. Thanks
Feb 4, 2019 at 18:03 comment added Kusalananda $line should be double quoted. Space is the default output field separator already. The if itself can be removed. ...resulting in awk -v l="$line" '$2 == "2017-09-27" { print l, $0 }'. Also, no comment about the lack of setting IFS and not using read -r?
Feb 4, 2019 at 17:15 comment added bbelden I am still unable to print the contents of the text file with the output of the AWK command. Any thoughts?
Feb 4, 2019 at 15:55 comment added bbelden What is the significance of the tt.txt at the end of the AWK command? In my scenario I am not reading the data from a file. It is the meta data attached to the files.
Feb 4, 2019 at 15:27 comment added Siva check my test sample.... should work... couldn't replicat your scenarion since URL is not accesable...
Feb 4, 2019 at 15:26 history edited Siva CC BY-SA 4.0
added 77 characters in body
Feb 4, 2019 at 15:17 comment added bbelden I just tried to the updated answer and I am still not seeing the container from the $line outputed in the AWK command.
Feb 4, 2019 at 15:13 history edited Siva CC BY-SA 4.0
added 2 characters in body
Feb 4, 2019 at 15:11 comment added bbelden I apologize for the formatting. The spaces did not appear. But that addition did not seem to print the contents of $line.
Feb 4, 2019 at 15:10 review Low quality posts
Feb 4, 2019 at 15:13
Feb 4, 2019 at 15:09 comment added bbelden I tried the statement above and it produced the following output: 1507732 2017-09-27 19:55:57 application/octet-stream ffd5eef3-2b75-4d4f-b30c-b9836b32a34c.FR.02 1812122 2017-09-27 19:55:57 application/octet-stream ffd5eef3-2b75-4d4f-b30c-b9836b32a34c.FS.02 So it did not seem to add the root container to the output of the AWK command. Thank you for the reply though.
Feb 4, 2019 at 15:07 comment added bbelden while read line; do echo -e swift list -l -A sslabapi/auth/v1.0 -U qa04 -K <Account Password> $line | bash; done < containers.txt | awk -v l=$line '{ if ($2 == "2017-09-27") print l $0}'
Feb 4, 2019 at 14:51 history answered Siva CC BY-SA 4.0