質問

PUTTY 0.62のSSH上のQNXニュートリノに接続しています。

「端末のASCI Colorsの指定を許可する」、「XTERM 256色モードを使用できるようにする」ことができました。

ターミナル(QANSI-M)を出力テキストに追加するにはどうすればよいですか。

役に立ちましたか?

解決

echoを使用しているときに次のように手動で色を追加できます。

グラフィックレンディションコードは次のとおりです。

Number  Meaning
0       All attributes off (except charset (10, 11, 12))
1       Bold
2       Half intensity (default to cyan on color screen)
4       Underline (default to red on color screen)
5       Blink
7       Reverse
9       Invisible
10      Exit alternate char set (GR & GL are restored)
11      Enter PC-lower char set (GR & GL are ASCII; C0 & C1 are PC_LO except for ESC)
12      Enter PC-higher char set (GR, C1 & GL, C0 are PC_HI except for ESC)
21      Normal intensity (un-Bold)
22      Normal intensity (un-Half intensity)
24      Disable underline
25      Disable blink
27      Disable reverse
29      Visible
30-37   Set foreground color (30+color_number, see below)
39      Set foreground to saved
40-47   Set background color (40+color_number, see below)
49      Set background to saved
.

カラーコードは次のとおりです。

colour_num  Description
0           Black
1           Red
2           Green
3           Brown
4           Blue
5           Violet
6           Cyan
7           White
.

構文:

{CSI}<setting1>;<setting2>m
.

OCTALのCSIは\ 0233であるため、太字のテキスト(1)を赤い前景(31)で印刷する(31)、

echo "\023331;1m"
.

参照

他のヒント

必要なANSIエスケープシーケンスを送信するには、ニュートリノ(シェルを含む)上で実行したプログラムを設定する必要があります。sshdが端末出力を傍受して変更することはできません。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top