سؤال

I have an alias in .profile that clears the terminal when "c" is entered:

alias c='clear'

I want to call a KornShell (ksh) script every time I enter "c" in the terminal. What is the best way to accomplish this? I have googled and not been able to find anything.

هل كانت مفيدة؟

المحلول

An alias is essentially just a text replacement for what you actually type. Try modifying your alias to read

alias c='clear; myscript.ksh'
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top