Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A shorter version of the same thing:

  Host *%*
    Proxycommand bash -c "h=%h; ssh \${h%%\\%%*} nc \${h##*%%} %p"
It would be shorter and cleaner if I knew a way to apply string operators on a constant string rather than defining the intermediate variable $h.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: