cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post

CLISH Commands in Expert Mode easier

Clish commands can only be used in expert mode with the following command for example 'clish -c "show route"'. To make this a bit easier, I wrote a simple script to simplify that.

 

Now you can use the new command "c" to execute clish commands. You only have to write the c before each clish command in expert mode.

For example, if you want to execute the clish command "show route", all you have to do is type the followingin expert mode:

 

# c show route

 

To install the small bash script you only have to copy and paste the following three lines in expert mode:

 

echo "echo \$@ > /var/log/clish.txt" > /bin/c
echo "clish -f /var/log/clish.txt" >> /bin/c
chmod 770 /bin/c

 

Now you have the new  "c" commandSmiley Happy.

 

Copyright by Heiko Ankenbrand  2018-2019

21 Replies

Re: CLISH Commands in Expert Mode easier

Re: CLISH Commands in Expert Mode easier

nice hack

Re: CLISH Commands in Expert Mode easier

I also find the reverse idea good to execute expert mode commands in clish. Unfortunately I can't do that:-)

That's the way I see it:

> e netstat -rn

Now the expert mode command is executed in the clish. Can you implement this?

I also know that the "dynamic clish" is planned. But here the commands different from the expert mode syntax and we have to learn everything new.

I want an "e" in the clishSmiley Happy.

Highlighted

Re: CLISH Commands in Expert Mode easier

Just one thing: your default shell needs to be /bin/bash. If you default log in with clish, go to expert and want to use this trick, you get a "configuration lock" message and cannot execute the command.

I would love that "e" option too... Smiley Happy

Re: CLISH Commands in Expert Mode easier

Dear Heiko Ankenbrand Thanks, it's working fine.

and Marcel Wildenberg‌ thanks for the trick. 

The below screenshot is showing that when I type any command like c show route  (as per the script Smiley Happy)

#Chinmaya Naik

Danny
Pearl

Re: CLISH Commands in Expert Mode easier

0 Kudos

Re: CLISH Commands in Expert Mode easier

Sharp.

I am not saying /bin/bash should be your default, the clish as default is blocking the trick.

Kudos on the "SCP only" shell.

Re: CLISH Commands in Expert Mode easier

Hi CHINMAYA 

yes, it is a small script.

Regards

Heiko

Re: CLISH Commands in Expert Mode easier

My clish is very much restricted without a tab key  - but nice idea!

Re: CLISH Commands in Expert Mode easier

Hi ,

Nice small script.

Re: CLISH Commands in Expert Mode easier

Yes an "e" in the clish!

Re: CLISH Commands in Expert Mode easier

Very helpful script!

Re: CLISH Commands in Expert Mode easier

Hi Heko,

better use the path /usr/local/bin/

Regards

Cem 

Luisa_G_
Iron

Re: CLISH Commands in Expert Mode easier

nice

Re: CLISH Commands in Expert Mode easier

nice hack

Re: CLISH Commands in Expert Mode easier

Hi Heiko

yes it is a nice idea:-)

Regards

Sonia

Re: CLISH Commands in Expert Mode easier

THX,

Heiko

0 Kudos

Re: CLISH Commands in Expert Mode easier

I could also write as an oneliner.

0 Kudos

Re: CLISH Commands in Expert Mode easier

I could also write as an oneliner.

Any interest?

0 Kudos

Re: CLISH Commands in Expert Mode easier

THX!

Yes, this is the better path /usr/local/bin/

Regards

Heiko

0 Kudos

Re: CLISH Commands in Expert Mode easier

I could also write it as an oneliner.

Any interest?

0 Kudos