Tag Info

New answers tagged

0

You can use nohup mpv FILE. The output is written to nohup.out which you can filter using tail and grep: nohup mpv FILE tail -f nohup.out |grep -v 'Error while decoding frame'


2

You can give mpv a fake terminal by using the script(1) program, for instance: script -c 'mpv FILE' /dev/null | grep -v 'Error while decoding frame' For Mac OS X, the syntax seems to be: script /dev/null mpv 'FILE' | grep -v 'Error while decoding frame' [edit: also check out Trick an application into thinking its stdin is interactive for additional ...


1

With xargs: xargs -a myurls sh -c 'wkhtmltopdf $@ all.pdf'


4

Try: # disable shell filename generation (globbing) # and temporarily save applicable shell state set -f -- "-${-:--}" "${IFS+IFS=\$2;}" "$IFS" "$@" # explicitly set the shell's Internal # Field Separator to only a newline eval "IFS='$(printf \\n\')" # split command substitution into an # arg array at $IFS boundaries while # eliding all blank lines in ...


0

Another approach: wkhtmltopdf $(printf '%s ' $(<myurls)) all.pdf


2

Unfortunately it's not the case with wkhtmltopdf, but many commands provide an option to read arguments from a file (wget -i for example); that's the preferred approach where possible. If whitespace in your file isn't important, command substitution works: wkhtmltopdf $(cat myurls) all.pdf Using xargs would also work with your example, but in general ...


3

I would just mv - f && less f. Problem solved.


3

Note: my answer is NOT valid in the OP's case, and only applies to tools following the convention mentioned below and not in the case of a file named exactly just - (dash), which is often also a special case to specify that reading from standard input is expected. See the accepted answer. Leaving this here as it contains useful information for other cases ...


51

Just prefix it with ./: less ./- Or use redirection: less < - Note that since - (as opposed to -x or --foo-- for instance) is considered a special filename rather than an option, the following doesn't work: less -- - # THIS DOES NOT WORK


3

That ^C handling is done by the terminal device driver, not the shell. It's when that character is received on the wire that connects to a tty device (or written on the master side of the master side of a pseudo-terminal pair (like xterm does when you press Ctrl+C)) that the tty line discipline (a driver in the kernel) sends the SIGINT signal to the ...


1

The wording of your question lends itself to the tar ... | wc -c answers above. I originally read your question with a silent assumption that you wanted the size to be reported while it was creating the tar file (perhaps tar's output was then being piped over a network link?). In which case, I'd suggest pv -- pipe viewer. I've seen reference to it but have ...



Top 50 recent answers are included