VSCodeのターミナルからシェルスクリプトを実行した際の結果を確認したい。
解決したこと
VSCodeのターミナルからシェルスクリプトを実行した際の結果を確認したい。
発生している問題・エラー
VSCodeのターミナルからシェルスクリプトを実行しても何も表示されない。testを表示したい。
PS C:\test\employee\script> .\shlscript.sh
PS C:\test\employee\script>
./shlscript.sh
PS C:\test\employee\script>
PS C:\test\employee\script> ls
ディレクトリ: C:\test\employee\script
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2025/03/11 7:03 DDL
d----- 2025/03/11 7:04 DML
-a---- 2025/03/21 5:45 1675 init.sh
-a---- 2025/03/21 5:50 24 shlscript.sh
PS C:\test\employee\script>
該当するソースコード
shlscript.sh
#!/bin/bash
echo "test"
環境
vscodeの拡張機能として下記はインストール済です。
・Remote Development
・Bash IDE
・shellcheck
0