4 lines
162 B
Bash
4 lines
162 B
Bash
|
#!/bin/bash
|
|||
|
|
|||
|
# 当 a.txt 存在时,执行 echo "good" >> a.txt,否则执行 echo "bad" >> a.txt
|
|||
|
test -e a.txt && echo "good" >> a.txt || echo "bad" >> a.txt
|