Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash for loop multiple statements

# Basic syntax:
for i in a b; do echo $i; printf "$i	$i
"; done
# Where:
#	- each command in the for loop needs to be separated by semicolons. Here
#		we echo $i and then print $i<tab>$i<newline>
#	- over several lines this would be equivalent to:
for i in a b
do
  echo $i
  printf "$i	$i
"
done
Comment

bash two for loops

for i in 0 1 2 3 4 5 6 7 8 9
do
    for j in 0 1 2 3 4 5 6 7 8 9
    do 
        echo "$i$j"
    done
done
Comment

PREVIOUS NEXT
Code Example
Shell :: bash division integer 
Shell :: ubuntu list disks 
Shell :: unix cp all files and folders at once 
Shell :: appimagelauncher install 
Shell :: install net tools in manjaro 
Shell :: discard all changes git 
Shell :: latest dart sdk version 
Shell :: stop nginx service 
Shell :: how to read input in bash 
Shell :: install bootstrap in angular 
Shell :: list enviroment variables 
Shell :: keep only last line bash 
Shell :: how to delete a folder from the terminal ubuntu 
Shell :: zip some files linux 
Shell :: adb screen record 
Shell :: docker daemon.json permission denied 
Shell :: git reset head to commit remote 
Shell :: docker compose down single container 
Shell :: base64 encode linux 
Shell :: mongodb did not start 
Shell :: Grab IP address only (Linux) 
Shell :: uninstall your phone app windows 10 
Shell :: kill process linux 
Shell :: convertir a sudoers user centos 
Shell :: run ionic live 
Shell :: bash how to run remote command 
Shell :: codeigniter 4 migrate 
Shell :: debian get minor version 
Shell :: merge child branch to parent git 
Shell :: service redis restart 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =