tmux new-window command plus argument including spaces - bash var
1
vote
1
answer
709
views
I'm trying to execute a command on a new tmux window. A simple console/terminal pdf reader. The script needs argument, a PDF file, the file name may include spaces. I've tried this:
#!/bin/bash
tmux new-window "pdftotext -layout -nopgbrk "${1}" - | less"
It works on files without spaces, eg 1.pdf
. I've tried sh
instead of bash
, $1
, "$1"
instead of "${1}"
, no effect.
Asked by Krackout
(2887 rep)
Nov 6, 2023, 08:10 AM
Last activity: Nov 6, 2023, 11:15 AM
Last activity: Nov 6, 2023, 11:15 AM