Supply the same filename as argument to two commands

On a git conflict, I can currently do: git diff path/to/some/file.txt … after reviewing the diff, usually I want to do: git checkout –theirs path/to/some/file.txt && git add path/to/some/file.txt It’s painstaking to edit both paths each time, so I’d like to be able to do the following: git checkout –theirs <ref> && git add path/to/some/file.txt … Read more

Terminal vs bash?

I’m on a Mac but I think this is generally Unix-applicable. I’m in the process of learning shell scripting and there’s something I seem to be missing. When I’m in the ordinary terminal, I can use scripting syntax like for loops and such in conjunction with commands to do stuff. But….bash opens an interpreter for … Read more

How do I run the same linux command in more than one tab/shell simultaneously?

Is there any tool/command in Linux that I can use to run a command in more than one tab simultaneously? I want to run the same command: ./myprog argument1 argument2 simultaneously in more than one shell to check if the mutexes are working fine in a threaded program. I want to be able to increase the number of instances of this program so as to put my code under stress later on.