Forrest logo
back to the fastmod tool

fastmod:tldr:378ec

fastmod: Replace for an exact string in .js or .json files.
$ fastmod --fixed-strings ${exact_string} ${replacement} --extensions ${json,js}
try on your machine

The command you provided is using the "fastmod" tool to perform replacements in multiple files with specific extensions.

Here is the breakdown of each part of the command:

  1. fastmod: This is the name of the command or tool you are using.

  2. --fixed-strings: This flag tells fastmod to perform a fixed string search, meaning it will replace the exact string match rather than using patterns or regular expressions.

  3. ${exact_string}: This is a placeholder for the exact string you want to replace. You need to replace ${exact_string} with the actual string you want to search for.

  4. ${replacement}: This is another placeholder for the replacement string. You need to replace ${replacement} with the actual string you want to replace ${exact_string} with.

  5. --extensions ${json,js}: This flag tells fastmod to only look for files with the specified extensions. In this case, it will search for files with ".json" and ".js" extensions. If you want to include more extensions, you can add them here separated by commas.

To use this command, replace ${exact_string} with the actual string you want to search for, and replace ${replacement} with the desired replacement string. Ensure that the files you want to modify have the extensions specified after --extensions.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the fastmod tool