문제

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