#!/bin/sh
x=0
while [ "$x" -ne 10 ]; do
echo $x
x=$(($x+1))
done
exit 0
[Output]
0
1
2
3
4
5
6
7
8
9
#!/bin/sh
cat << !FUNKY!
hello
this is a here
document
!FUNKY!
[Output]
hello
this is a here
document
#!/bin/sh
ed a_txt_file << !FunkyStuff!
3
d
.,\$s/is/was/
w
q
!FunkyStuff!
exit 0
[Output]
61
that is line 3
47
[a_txt_file :previous content]
that is line 1
that is line 2
that is line 3
that is line 4
[a_txt_file : content after executing shell]
that is line 1
that is line 2
that was line 4
shell-here
最新推荐文章于 2022-05-01 12:05:11 发布