User Tools

Site Tools


use_of_spaces

If you want to send us your comments, please do so. Thanks
More on comments


bash scripting

Use of spaces

#! /bin/bash
 
i=0			# Spaces before and after the = sign are not allowed!
# Make an infinite loop
while [ 1 ]		# Spaces after [ and in front of ] are obligatory
do
  i1=($i % 4)		# No spaces needed after ( and in front of ) it is allowed.
			# It improves the readability
			# Do not place spaces before and after the = sign!
  echo $i1
  ((i++))		# No spaces needed after (( and before )) it is allowed however
  if [ $i -eq 21 ]	# Spaces after [ and before ] are obligatory
			# -eq means: is equal
  then
    i=1
  fi
done			# Return to the while statement, restart the infinite loop

Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
use_of_spaces.txt · Last modified: 08-12-2014 23:27 by wim