Debian 11でシェルスクリプトを実行するサンプル

環境
Debian 11.2

操作方法
1.「test」というスクリプトを作成します
root@arkgame:~# vi test
以下の内容を入力します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
#!/bin/bash
echo "study skill become smart"
#!/bin/bash echo "study skill become smart"
#!/bin/bash

echo "study skill become smart"

2.実行権限を付与します
root@arkgame:~# ls -l test
-rwxr–r– 1 root root 45 1月 22 05:28 test
root@arkgame:~# chmod u+x test

3.スクリプトを実行します
root@arkgame:~# ./test
study skill become smart

Debian 11

Posted by arkgame