Article 6DC2P Write to and read from file descriptors in awk

Write to and read from file descriptors in awk

by
blueray
from LinuxQuestions.org on (#6DC2P)
I am trying to write to one file descriptor and then read the output from another file descriptor in awk.

Code:#!/usr/bin/env bash

coproc get_icon_from_path_stdin

exec 10>&"${COPROC[1]}"
exec 11<&"${COPROC[0]}"

awk '{ print $0 > /dev/fd/10
getline result < /dev/fd/11
print result }' $HOME/.dotfiles/rofi-bookmarks-listHere `result` returning null values.

Not understanding the problem here.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments