splitcopy.sh

来自「Shall高级编程」· Shell 代码 · 共 26 行

SH
26
字号
#!/bin/bash# splitcopy.sh#  A script that splits itself into chunks,#+ then reassembles the chunks into an exact copy#+ of the original script.CHUNKSIZE=4    #  Size of first chunk of split files.OUTPREFIX=xx   #  csplit prefixes, by default,               #+ files with "xx" ...csplit "$0" "$CHUNKSIZE"# Some comment lines for padding . . .# Line 15# Line 16# Line 17# Line 18# Line 19# Line 20cat "$OUTPREFIX"* > "$0.copy"  # Concatenate the chunks.rm "$OUTPREFIX"*               # Get rid of the chunks.exit $?

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?