0

I want to set an alias in bashrc to preform an ssh command

alias sshh='ssh 192.168.1."$1"' 

then I can use

$> sshh 306  

to perform

$> ssh 192.168.1.306  

It seems I didn't get the command right.

user2818066
  • 618
  • 2
  • 8
  • 19
  • It behaves differently to put the argument in beginning a string or in the end of the string. See the reference does not help me. I still do not know what is wrong with my alias command. – user2818066 Jan 25 '18 at 05:37
  • I do not want to use function. Is it possible to do that? If you know how, could you please simply fix the alias command to make it work? Thanks! – user2818066 Jan 25 '18 at 06:10

0 Answers0