小编Joh*_*ohn的帖子

如何连接三个文件(并跳过一个文件的第一行)并将其作为输入发送到我的程序?

有文件 A、B、C。我想连接文件 A、B 和 C(跳过 C 的第一行)。然后将它们作为输入发送到 myProgram。我怎样才能在shell脚本中写这个?

我是这么写的

cat A > file
echo >> file     //want to start all contents in new line
cat B >> file
tail -n+2 C >> file
./myProgram < file 
Run Code Online (Sandbox Code Playgroud)

但我不知道如何连接它们并发送到程序而不生成文件

shell-script text-processing

4
推荐指数
3
解决办法
903
查看次数

标签 统计

shell-script ×1

text-processing ×1