I would like to put all jq filters inside a text file and use the jq -L option to execute the filters. However, I can’t get this simple thing working. Inside my sample2.json file, I have: Inside my json2csv file, I have: When I do: The output is the whole sample.json file, like this: but I would expect the output
Tag: parsing
Does linux “gdb a.out param1 param2” pass param1 and 2 to “gdb” or “a.out”?
Is there any case that param1 and param2 are passed to gdb, and some cases passed to a.out, and some cases, 1 for each? How does linux shell parse and decide which param for which program? Thanks. Answer How does linux shell parse and decide which param for which program? Linux shell simply passes all params to gdb. It’s gdb
Parse ps’ “etime” output and convert it into seconds
These are possible output formats for ps h -eo etime How to parse them into seconds? Please assume at least 3 digits for the days part as I don’t know how long it can be. The output will be egreped to one only line so no need for a loop. Answer With awk: Run with : Output: And finally, if
iwlist scan output format
I have to write a tool to get the encryption type out of a iwlist scan. I just can’t seem to find whether or not there’s a standard output. Googling it looks like people are posting slightly different formats, but I can’t tell if they just copy/pasted wrong or what. Specifically, in Encryption key: On, is On/Off frist letter always