In that case it will only print the match and you will not know in which file.
The trick is to add a dummy filename as a second file to search. Doing so will trick grep / egrep into thinking you are searching in multiples files, thus displaying the filename on each match. /dev/null is the perfect target for the second dummy file as it will never match anything.
Exemple: list all json files from current directory and print the difference with updated jsons from updated/ directory
for user in `ls updated-users`
# print file name
diff <(jq -S . users/$user) <(jq -S . updated-users/$user)
# or full on one side and the diff on the other side
# diff -y --left-column <(jq -S . users/$user) <(jq -S . updated-users/$user)
# or full on one side and the diff on the other side, colored
# diff -y --left-column --color <(jq -S . users/$user) <(jq -S . updated-users/$user)
If you ever need to use a proxy when updating / installing packages in msys2 you’ll have to set the following environnement variables, and put them i.e in your .bash_profile :
# .bash_profile example
# Note: username and password have to be url encoded in case they contain special chars
# or like this if not user/password required
# export http_proxy=http://proxy:port
# if you need a proxy ignore list
A few days ago I had to list the arguments for specific process. While finding it using “ps -aef | grep ‘processname'” and getting the information is trivial under linux, it is not the case using cygwin, which is only reporting process name and pid when calling “ps”.
A lot of solutions involve installing cygwin packet, like pstree.
Another solution is to search the /proc/pid/cmdline files, like here:
One particularly right: “Asserting that [Technology O] or [Platform L] or [Methodology A] is inherently superior to all others and blindly applying it to all problems. When you make such claims, are you applying science or religion?”
“It’s easy to fall into cargo cult mode. Just re-boot it, it’ll be fine.” – Michael Janke