このガイドでは、Nuシェルをインストールして使用する方法を説明します。 Linuxの場合。
はじめに
Nuシェルは新しいLinuxシェルであり、パイプstrong>を使用してコマンド出力を簡素化することを目的としています。 。興味深い組み込みコマンドが付属しており、高速で使いやすいです。 Nuシェルの焦点は、端末ユーザーが端末を所有し、必要に応じて出力を生成するように命令できるようにするパイプライニングです。
NuShellをインストールする Linuxの場合
最新のnuシェルをインストール
- 以下のコマンドを実行して、Nuシェルの最新リリースをダウンロードします
curl -s https://api.github.com/repos/nushell/nushell/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep linux | wget -i -
- アーカイブファイルを抽出します。
tar xvf nu_*_linux.tar.gz
- 抽出したファイルを/usr/ local /bin/パスにコピーして実行可能にします
cd nu_*_linux/nushell-*/
cp -R * . /usr/local/bin/
- nuシェルのバージョンを確認
nu --version
nushell 0.44.0

- コマンドnuを実行してNuシェルを起動します 以下に示すように:
nu
Welcome to Nushell 0.44.0 (type 'help' for more info)
/home/qadry>
DockerでNuShellをインストールして実行する
- 次のコマンドを実行して、DockerでNuシェルをインストールします。
docker run -it quay.io/nushell/nu:latest
Unable to find image 'quay.io/nushell/nu:latest' locally
latest: Pulling from nushell/nu
123347c49d0f: Pull complete
419640447d26: Pull complete
61k83d862619: Pull complete
7495ba04a596: Pull complete
172cuc92237d: Pull complete
Digest: sha256:3kiw8ae65b58232a863f243ed06jaf35j8al91880ad8623f4a508fa12340ksahw
Status: Downloaded newer image for quay.io/nushell/nu:latest
Welcome to Nushell 0.44.0 (type 'help' for more info)
/>
NuShellを使用する
- 実行してみてくださいls たとえば、コマンドを使用すると、出力と通常のシェル出力に違いがあることがわかります。Nuシェルでは、出力は構造テーブルにあります。
ls

- 上記のテーブルをサイズで並べ替えることができます
> ls | sort-by size

- 上に示したように、結果は降順モードで配置され、逆を使用します 以下に示すように、フラグを立てて昇順に変更します
> ls | sort-by size | reverse

- ファイルを表示または開くこともできます。たとえば、backup.logファイルを開きます
open backup.log

- 下のスクリーンショットは、vimで開いたときに同じファイルがどのように見えるかを示しています
vim backup.log

- コマンドで現在の日付を表示します:
date now

- calコマンドを実行します
cal

結論
以上です
このチュートリアルでは、Nuシェルをインストールして使用する方法を説明しました。 Linuxの場合。
ありがとう