シェルスクリプトの変数名を数字で初めていけない

他のプロブラムでもそうですが、変数名に数字で始めるとシェルスクリプトではエラーになります
#!/bin/bash1str="TEST"echo "$1str"$sh test.shtest.sh: 行 3: 1str=: コマン ...auto_increment(オートインクリメント)の連番を初期化する「MySQL」

MySQLでauto_increment(オートインクリメント)では、自動で現在格納されているナンバーの最大値に 1 を追加した数値を自動で付与する機能です。
この機能で作ったテーブルで本番移行とかでデータを削除して本番移 ...
シェルスクリプトで変数が空文字であるか調べる

シェルスクリプトで変数に値が入っているか調べるには、testコマンドやif分で変数の値を比較して調べることができます。
testコマンドで変数が空文字であるか調べるtestコマンド ...
JAVAのアップデートで「このページのスクリプトでエラーが発生しました。」と表示されアップデートできない

Javaの更新がはいり、自動アップデートをおこなうと下記のエラーが表示されインストールできない場合があります。私の環境だとほど毎回できませ ...
locateコマンドのインストール

検証サーバーを最小構成で構成したので、locateコマンドがインストールされずいないので、mlocateパッケージをインストールすればインストールされます
$ sudo yum install mlocateインストール直 ...
Google日本語入力の履歴を削除する

Google日本語入力で、今まで入力した単語・文章などの文字列を次回以降の入力候補として保存され、次回以降に全ての単語を入力しなくてもその単語の候補として表示するサジェスト機能があります。
yumエラー:「Not using downloaded mariadb/repomd.xml because it is older than what we have:」

検証用のサーバーで、yumでレポジト ...
4GB以上のファイルをUSBメモリにコピーできない場合

USBメモリにCentOSのisoファイルをコピーしようとすると「ファイルが大きすぎます」と表示されUSBメモリにコピーできない状態でし ...
IPアドレスをsortコマンドで並び替える

IPアドレスを記載されている下記のようなテキストファイルがある場合に、sortコマンドを利用してIPアドレス順に並べるには、「-V –version-sor ...
ファイルの所有者を監視するスクリプト

PHPでファイルの書込み処理をするプログラムがあって、そのファイルの所有権が「apaceh」以外だとパーミッションエラーとなり書込みが失敗するので、ファイルの所有者がApacheか ...
Squidの帯域制限(速度制限)の仕方

CentOS 6系のサーバーでSquidを使用していて、専用線を引いており契約している速度からたまに超える場合があるので、帯域制限(速度制限)をしたいと要望があったので、以下のように「squid.conf」を変更しました。
WSLのUbuntuをリセット(初期化)する

WSL環境で、Ubuntuをインストールされている状態で初期化(再インストール)のような状態にする方法を紹介します。
通常のUbuntuであれば、OSを再インストールす ...
PHPでファイルに文字列を書き込む「file_put_contents()」

PHPでファイルに文字列を書き込むには「file_put_contents()」の関数で書き込みできます。
ファイルに書き込むには、ファイルを開く関数「fo ...
PHP で改行コードを削除する

PHPで改行コードを取り除く方法ですが、ネットで調べるといろいろな方法がありますが、str_replaceで改行を取り除く方法を紹介します。まず、下記のような改行を含む変数があるとします
< ...コメントアウトの書き方【JavaScript】

JavaScriptでコメントアウトの書き方ですが、2種類あります。1行のみコメントアウトで使用する場合は「//」を使用する事が多いです
<script>//Hello world!! を表示document.wri ...