Is there a Pattern Matching Utility like GREP in Windows?

I also found one more way of utilizing GREP like functionality in Windows 7 and above without any extra application to install and on older systems you can use install Powershell. In Powershell, User can use Where-Object it has quite comprehensive set of feature that provides all the functionality of GREP plus more. Hope It helps.

How to grep and replace

I need to recursively search for a specified string within all files and subdirectories within a directory and replace this string with another string. I know that the command to find it might look like this: But how can I replace every instance of string_to_find with another string?

How to get the process ID to kill a nohup process?

When using nohup and you put the task in the background, the background operator (&) will give you the PID at the command prompt. If your plan is to manually manage the process, you can save that PID and use it later to kill the process if needed, via kill PID or kill -9 PID (if you need to force kill). … Read more

Delete all local git branches

The ‘git branch -d’ subcommand can delete more than one branch. So, simplifying @sblom’s answer but adding a critical xargs: or, further simplified to: Importantly, as noted by @adminndrewC, using git branch for scripting is discouraged. To avoid it use something like: Caution warranted on deletes!

Using the star sign in grep

The asterisk is just a repetition operator, but you need to tell it what you repeat. /*abc*/ matches a string containing ab and zero or more c’s (because the second * is on the c; the first is meaningless because there’s nothing for it to repeat). If you want to match anything, you need to say .* — the dot … Read more