Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Shell Programming/If

From Wikibooks, open books for an open world
<Shell Programming
This page may need to bereviewed for quality.


The if statement has the following basic structure:

  if [ condition of expressions ]; then  fi


Using && and || in control statements

[edit |edit source]

The && and || can be used in control statements to represent nested loops like:

  if [ condition1 ]; then     if [ condition 2 ]; then     fi  fi

as:

  if [ condition1 ] && [ condition2 ]; then  fi
Retrieved from "https://en.wikibooks.org/w/index.php?title=Shell_Programming/If&oldid=1978967"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp