introduction to bash shell script

Recently, I found that bash script is very useful to perform some tasks. Thus, I write a summary of it.

Resources

There’s a tutorial.

Simple Example

1
2
3
4
5
#!/bin/bash
for i in {1..400};
do
echo item: $i
done
1
2
3
4
5
#!/bin/bash
for ((i=1;i<=100;i++));
do
echo $i
done