📄 logging-wrapper.sh
字号:
#!/bin/bash# Generic shell wrapper that performs an operation#+ and logs it.# Must set the following two variables.OPERATION=# Can be a complex chain of commands,#+ for example an awk script or a pipe . . .LOGFILE=# Command-line arguments, if any, for the operation.OPTIONS="$@"# Log it.echo "`date` + `whoami` + $OPERATION "$@"" >> $LOGFILE# Now, do it.exec $OPERATION "$@"# It's necessary to do the logging before the operation.# Why?
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -