我有一个输出 git 存储库 SSH URL 的脚本,如下所示:
git@example.com:namespace/project.git
git@example.com:another_namespace/some_other_project.git
Run Code Online (Sandbox Code Playgroud)
git clone我想为每一行运行命令(或其他命令)。
我尝试将其通过管道传输到xargs,但我要么在一行中获得输出,要么将多行输入转储到单个命令。
如何通过管道在每一行上运行任意命令?