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
  • I guess the double quotes are wrong, aren't they? Commented Feb 8, 2023 at 22:33
  • No, tested as well. Why? Commented Feb 8, 2023 at 22:35
  • Because of this line: "echo "message" | cut -c ".. (is just a string). I've not (and cannot) tested for now the code so I had that doubt. Commented Feb 8, 2023 at 22:39
  • $ awk 'BEGIN{message="ABC";"echo "message" | cut -c 3" | getline m;print m}' result = C Commented Feb 8, 2023 at 22:54
  • Oh, nice! +1. So it's possible to execute commands by using pipes. I had no idea about it. I only knew about system() function. Commented Feb 8, 2023 at 23:29