You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
There are many reasons you would want to restore a database from a backup file... But you should also test this on a test server just to make sure that your database backups are working correctly. Here's the syntax: mysql -h hostname -u username -pthepassword databasename < dumpfile.sql Here's an example: mysql -h localhost -u root -p72aDufi8 db01 < thedumpfile.sql
Many people hack together shell scripts quickly to do simple tasks, but these soon take on a life of their own. Unfortunately shell scripts are full of subtle effects which result in scripts failing in unusual ways. It’s possible to write scripts which minimise these problems. In this article, I explain several techniques for writing robust bash scripts. How often have you written a script that br
ユーザー定義変数の使い方 変数は、シェルの世界、とくに英語のドキュメントでは「パラメータ」と呼ばれていますが、日本語でパラメータというとどうも違う意味にとられがちなので、ここでは「変数」と呼ことにしたいと思います。ではシェルスクリプトにおける「変数」の取扱と特徴について見ていくことにしましょう。 シェルやシェルスクリプトで変数を定義する場合は、 のように記述します。とくに前もって変数を宣言したりする必要はありません(宣言することもできますが)。‘=’の両側にスペースをあけたりしてはいけません。C言語などの変数代入などの際にスペースをあける癖のある方は気をつけてください。 格納された値を参照する場合は、変数の先頭に‘$’をつけます。ためしにechoを使って標準出力に変数を表示してみます。
Bash Shell: Take Control of PS1, PS2, PS3, PS4 and PROMPT_COMMAND Your interaction with Linux Bash shell will become very pleasant, if you use PS1, PS2, PS3, PS4, and PROMPT_COMMAND effectively. PS stands for prompt statement. This article will give you a jumpstart on the Linux command prompt environment variables using simple examples. 1. PS1 – Default interaction prompt The default interactive p
ないだろうと思いながらぐぐってみたら、 shUnit2 is a xUnit unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc. If you have ever had the desire to write a unit test for a shell script, shUnit2 can do the job. Google Code Archive - Long-term storage for Google Code Project Hosting. あるじゃないか! とりあえず、動かしてみよ。 shunit2 をダウンロードして解凍して、 $ mkdir -p ~/Documents/
7.3. Other Comparison OperatorsA binary comparison operator compares two variables or quantities. Note that integer and string comparison use a different set of operators. integer comparison -eqis equal to if [ "$a" -eq "$b" ] -neis not equal to if [ "$a" -ne "$b" ] -gtis greater than if [ "$a" -gt "$b" ] -geis greater than or equal to if [ "$a" -ge "$b" ] -ltis less than if [ "$a" -lt "$b" ] -lei
Bash Special Parameters Explained with 4 Example Shell Scripts As part of our on-going bash tutorial series, we discussed about bash positional parameters in our previous article. In this article let us discuss about the bash special parameters with few practical shell script examples. Some of the bash special parameters that we will discuss in this article are: $*, $@, $#, $$, $!, $?, $-, $_ To a
6 Bash Conditional Expression Examples ( -e, -eq, -z, !=, [, [[ ..) Bash expression is the combination of operators, features, or values used to form a bash conditional statement. Conditional expression could be binary or unary expression which involves numeric, string or any commands whose return status is zero when success. There are several conditional expressions that could be used to test wit
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く