Tag Info

New answers tagged

0

Simple example of escaping quotes in shell: $ echo 'abc'\''abc' abc'abc $ echo "abc"\""abc" abc"abc It's done by finishing already opened one ('), placing escaped one (\'), then opening another one ('). Alternatively: $ echo 'abc'"'"'abc' abc'abc $ echo "abc"'"'"abc" abc"abc It's done by finishing already opened one ('), placing quote in another quote ...


1

Here is escaped command: alias mm='ps -u $USER -o pid,rss,command | \ awk '\''{print $0}{sum+=$2} END {print "Total", sum/1024, "MB"}'\' Example of escaping quotes in shell: $ echo 'abc'\''abc' abc'abc $ echo "abc"\""abc" abc"abc It's simply done by finishing already opened one ('), placing escaped one (\'), then opening another one ('). ...


0

I was trying something very similar with ssh and passing a command line through it. e.g. ssh <somehost> ls -l "$PATH" I found that simply defining "$PATH" didn't do the trick - it still threw up errors. However if I ran ssh <somehost> ls -l "\"$PATH"\" This worked. The trick is to ensure an additional set of " " gets passed to the ssh ...


0

w3m can be a decent pager (though I do prefer less). It supports the mouse (you may need to enable this in the configuration), including scrolling. Vim is a text editor but can be used as a pager: set PAGER='vim -R'. You can enable mouse support with set mouse=a in your ~/.vimrc. The wheel works at least in xterm, I can't vouch for OSX's terminal emulator.


0

I set my terminal emulator to send arrow keys for the scroll wheel when in alternate screen mode. In iTerm2, that's under Preferences > Advanced and search for "scroll". It doesn't interfere with xterm escape codes when something supports it, but when it does not (like in less), it sends arrow keys instead. Still not a complete solution, but better than ...


1

It seems this is possible using WoMan in Emacs. According to http://www.emacswiki.org/emacs/WoMan “woman” stands for “w/o man”, ie “without man” and allows you to view man pages without having the “man” program installed. In Emacs enter: M-x woman Where M-x is the Alt key followed by the letter x. You will then be prompted to specify the man page you ...


0

you can use cat man --pager=cat <page> or you can pipe the man page into cat man <page> | cat



Top 50 recent answers are included