Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • thank you so much! I have a qustion about using the awk commands. After I type in the command, it doesn't give the output, it will display a 'quote>' instead of the result. Why will it happen? Commented Sep 25, 2021 at 18:32
  • I have updated my question. Why won't I get the result? Commented Sep 25, 2021 at 18:50
  • 1
    @YKILYCHAN > in a shell prompt is normally PS2 (secondary prompt). I don't know MacBook or zsh, but if it prompts with quote> I would guess it is asking for a continuation line because you have an unpaired quote in a previous line. Commented Sep 25, 2021 at 21:28
  • @YKILYCHAN I would guess you aren't providing the input file name on the command line and are running awk 'script' instead of awk 'script' file so awk is waiting for you to type some lines of input. Commented Sep 27, 2021 at 16:55
  • 1
    zsh promts you with quote> if you are inside a single quoted string. Make sure that you use the same character to start and finish your awk program, usually the single quote in the lower right of the keyboard rather than say the backquote. Commented Sep 27, 2021 at 22:38