gawk
Shell variable interpreted wrongly in awk
In following code I am trying to pass shell varibale to awk. But when I try to run it as a.sh foo_bar the output printed is\"foo is not declared\" and when I run it as a.sh bar_bar the output printed[详细]
2023-01-12 03:51 分类:问答using 'set' variables that are gawk one liners
i am writing a short bat file that contours a xyz file with GMT utilities (gener开发者_JS百科ic mapping tool) i want to read the max and min file and use it later in the bat file what i did is[详细]
2023-01-09 03:18 分类:问答changing content of the column without destroying formating
$ echo \"ab\" | awk \'{print $0; $1=\"1\"; print $0}\' ab 1 b I would like to receive formatted output like this:[详细]
2023-01-05 18:27 分类:问答matching files with regular expressions
I have an input file with a list of movies (Note that there might be some repeated entries): American_beauty__1h56mn38s_[详细]
2023-01-03 17:33 分类:问答Efficient splitting of elements in a field
I have a field in a text file exported from a database.The field contains addresses but sometimes they are quite long and the database allows them to contain multiple lines.When exported, the newline[详细]
2022-12-26 18:48 分类:问答gawk / awk: piping date to getline *sometimes* won't work
I\'m attempting to convert dates from one format to another: From e.g. \"October 29, 2005\" to 2005-10-29.[详细]
2022-12-21 22:27 分类:问答how to use sed, awk, or gawk to print only what is matched?
I see lots of examples and man pages on how to do things like search-and-replace using sed, awk, or gawk.[详细]
2022-12-11 05:08 分类:问答GNU awk: accessing captured groups in replacement text
This seems like it should be dirt simple, but the awk gensub/gsub/sub behavior has always been unclear to me, and now I just can\'t get it to do what the documentation says it should do (and what expe[详细]
2022-12-08 21:13 分类:问答Formula in gawk
I have a problem that I’m trying to work out in gawk. This should be s开发者_如何学运维o simple, but my attempts ended up with a divide by zero error.[详细]
2022-12-08 02:03 分类:问答