Thanks NIcholas!
That is much better since it gets the exact pane id. :)
Best wishes! /Karl

On Wednesday, 15 July 2020 09:38:49 UTC+2, kal le wrote:
>
> Hi
> I hope you are doing great! 
> I'm trying to fetch the pid of a command that I execute within tmux.
>
> So I'm in linux and starting a command like this
> tmux new-window -n foo "sleep 10"
>
> and now I want to fetch the pid of the "sleep 10" process.
> The best solution I found (I can have multiple of the same process within 
> tmux) is to
> tmux list-panes -a -F "#{window_name} #{pane_pid}" | grep foo
>
> Do you know a better way to do this?
> Thanks and best wishes! /Karl
>

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/25dbed4c-26ac-45bd-a893-82a1595a397ao%40googlegroups.com.

Reply via email to