mirror of
https://github.com/dunwu/linux-tutorial.git
synced 2024-04-15 19:55:24 +08:00
11 lines
301 B
Bash
11 lines
301 B
Bash
|
#!/bin/bash
|
|||
|
|
|||
|
# using the tee command for logging
|
|||
|
#将输入一边发送到STDOUT,一边发送到日志文件
|
|||
|
tempfile=test
|
|||
|
echo "This is the start of the test" | tee $tempfile
|
|||
|
echo "This is the second line of the test" | tee -a $tempfile
|
|||
|
echo "This is the end line of the test" | tee -a $tempfile
|
|||
|
|
|||
|
|