Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 530  / 2 Years ago, fri, february 18, 2022, 12:09:07

I want to use less as a pager for mysql client. I want to add -F to force quit for short outputs. But I can't combine both correctly.



root@jupiter:/# mysql -p -u root -h localhost --pager=less -F
mysql: unknown option '-F'


is there a way?



Anyway I have some newbie trouble with less:



cat oo.txt            # shows me some short garbage
cat oo.txt |less -F # nothing happens, I expect show and quit.
less -F oo.txt # nothing happens, I expect show and quit.
less oo.txt # shows the short garbage and waits for q keystroke (or whatever)


I am connected via putty if that matters.


More From » mysql

 Answers
6

I think you forgot to quote:



mysql -p -u root -h localhost --pager='less -F'


-F gets passed to mysql instead of less when you don't pass less -F as a single string.


[#20520] Saturday, February 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ardingiba

Total Points: 497
Total Questions: 95
Total Answers: 109

Location: Gabon
Member since Sat, Jan 15, 2022
2 Years ago
;