Artificial intelligent assistant

More succinct alternative to "lsof -p $(pidof postgres| sed -r 's/ /,/g')" pidof returns a space separated list of pids. lsof -p requires a comma serparated one. This can be solved with sed via: lsof -p `pidof postgres| sed -r 's/ /,/g'` However, the extra pipe seems a bit much for a simple operation. Is there a simpler way?

A good alternative is psgrep -d ,


lsof -p $(pgrep -d , postgres)


`-d` Specifies the delimeter.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4af659471fe78ebbcfa7eadda0f006cc