Skip to main content
15 events
when toggle format what by license comment
Feb 16, 2019 at 10:17 comment added JJoao Perhaps: $NF ~ /\.pdf/
Feb 16, 2019 at 6:53 comment added Tim Thanks. The output has a pathname in each line. In each line, there are several blank spaces(?) in front of a pathname. Can the blank spaces be suppressed in the output?
Feb 16, 2019 at 6:38 comment added Tim Thanks. If I would like to allow arbitrary number of string's to match against, and I would like to put the awk command in to a bash script which accept the string's as command line arguments, how would you arrange the arbitrary number of string's (provided as positional parameters in the shell script) in the the awk command in the shell script? (the relation between multiple string's is AND, i.e. all the string's must appear in the pathname, albeit in arbitrary order.
Feb 16, 2019 at 3:33 comment added Tim I am using GNU Awk 4.1.4. (1) Does gawk cause the problem? (2) What do you think of gawk vs mawk?
Feb 16, 2019 at 2:41 comment added jesse_b @Tim: It doesn't for me using mawk 1.2
Feb 16, 2019 at 2:35 comment added Tim Why does PDFXCview 4333 t 255r REG 8,4 880 27793700 /home/t/program_files/document/formats/pdf/TrackerSoftware/pdfxcview/pdfxchange_portable/PDFXCview match \.pdf?
Feb 16, 2019 at 2:33 comment added Tim That works. But still why /.../pdf.../... matches \.pdf?
Feb 16, 2019 at 2:32 comment added jesse_b @Tim: How about "\.pdf$"
Feb 16, 2019 at 2:31 history edited jesse_b CC BY-SA 4.0
added 1 character in body
Feb 16, 2019 at 2:23 comment added Tim Sorry, forgot to say $NF ~ "\.pdf" doesn't work either. pathnames containing /.../pdf.../... will still match. I don't know why they match.
Feb 16, 2019 at 2:15 history edited jesse_b CC BY-SA 4.0
added 1 character in body
Feb 16, 2019 at 2:15 comment added jesse_b @Tim: Thanks didn't realize that. I'll update with \
Feb 16, 2019 at 2:14 comment added Tim Thanks.$NF ~ ".pdf" the . doesn't work as a literal dot.
Feb 16, 2019 at 2:13 history edited jesse_b CC BY-SA 4.0
added 42 characters in body
Feb 16, 2019 at 2:02 history answered jesse_b CC BY-SA 4.0