On Mon 06 Feb 2023 at 19:54:20 (+0000), Ottavio Caruso wrote: > Am 06/02/2023 um 19:05 schrieb Greg Wooledge: > > ssh LAP2 'type hibernate.sh; echo "$PATH"' > > _Touché !_ You nailed it: > > > $ ssh LAP2 'type hibernate.sh; echo "$PATH"' > bash: line 1: type: hibernate.sh: not found > /usr/local/bin:/usr/bin:/bin:/usr/games
On Mon 06 Feb 2023 at 10:38:56 (+0000), Ottavio Caruso wrote: > Am 04/02/2023 um 15:15 schrieb Greg Wooledge: > > On Sat, Feb 04, 2023 at 02:13:54PM +0000, Ottavio Caruso wrote: > > > > > $ ssh LAP2 hibernate.sh # it works too Why doesn't ssh LAP2 'type hibernate.sh' work when ssh LAP2 hibernate.sh does? > For some reason, I though ssh would inherit the $PATH from .profile, > which sources .bashrc, but of course this is not an interactive shell. Cheers, David.