コマンドループコマンド?

コマンドループコマンド?

command1実行時に実行される、、をcommand2含むコマンドはありますか?command3command4etcサイクルこれらの間?

私の考えは、このコマンドを次のように使用することです。ショートカットまたはランチャー~/.local/share/applications例:パネルまたはドックランチャーで)さまざまなコマンド間を循環します。

似たようなものを探しています。disperループ表示機能:disper --cycle-stages='-e : -c : -S : -s' --cycle独立して実行できるコマンド間を繰り返すコマンドです。disper -e、、、、。他のコマンド間を循環するのに役立ちます。disper -cdisper -Sdisper-s

しかし、disper繰り返し表示することはできますが、それを実行できるCLIツールがあるかどうか疑問に思います。個々のコマンド間ループ。ディスプレイを使わずにループを回すつもりですが、disper必ずしも動作しません。たとえば、次のようにループコマンドの実行プログラムまたはショートカットがあります。

xrandr --output VGA1 --auto --output LVDS1 --off 
xrandr --output VGA1 --auto --left-of LVDS1 --output LVDS1 --auto --primary 
xrandr --output VGA1 --auto --left-of LVDS1 --primary --output LVDS1 --auto  
xrandr --output VGA1 --off --output LVDS1 --auto 

次のようにする必要があります。cycling-tool 'command1, command2, command3, command4'


私は中級のGUIユーザーであり、CLIの使用には全くうまくいきません。私が求める原則的な理由が達成されない場合がある場合は、あるレベルの口語体に適した方法(あまり難解ではない方法)で答えを提供してください。

ベストアンサー1

BASHシェルにある場合、

Ctrl + r   Recall the last command including the specified character(s)
             searches the command history as you type.

Ctrl + rすべてのコマンドの間に最初の共通文字(たとえば)を入力してみることができますdisp。を押してctrl繰り返すと、rシェルはコマンドを繰り返します。

おすすめ記事