Bash 将附加参数传递给可执行文件

Bash 将附加参数传递给可执行文件,bash,shell,parameter-passing,Bash,Shell,Parameter Passing,我通过docker运行sharelatex,需要它在编译时使用-shell转义标志(对于某些包(minted))sharelatex调用类似于pdflatex的一些参数来运行pdflatex。我试了最后一个答案 因此,我将pdflatex重命名为pdflatex\u orig,并创建了以下脚本: #! /bin/sh pdflatex_orig -shell-escape 使用该标志运行realpdflatex 问题是参数没有传递。因此,如果我运行pdflatex--v交互式shell启动。

我通过docker运行
sharelatex
,需要它在编译时使用
-shell转义
标志(对于某些包(minted))
sharelatex
调用类似于
pdflatex的一些参数
来运行
pdflatex
。我试了最后一个答案

因此,我将
pdflatex
重命名为
pdflatex\u orig
,并创建了以下脚本:

#! /bin/sh
pdflatex_orig -shell-escape 
使用该标志运行real
pdflatex

问题是参数没有传递。因此,如果我运行
pdflatex--v
交互式shell启动。如果我运行
pdflatex\u orig--v
,它会提供一些关于版本的信息

那么,有没有办法将参数“管道化”到原始脚本+我的shell转义标志?

使用
“$@”

#!/bin/sh
pdflatex_orig -shell-escape "$@"