This script saves the content of all project files to a single output file. It supports specifying output file name, ignoring specific files and folders, and scanning nested directories.
- Save all project files content to an output file.
- Exclude current bash script file.
- Get output file name with
--output filename.mdargument. - Get ignored files and folders with
--ignoreargument. - Script scans all project files, including nested folders and files.
- If the user does not define the
--outputfile name, the default file name is "data.txt".
To make the save.sh script executable on your computer, you need to set the executable permission for the file. You can do this using the chmod command. Here's how:
chmod +x save.shThis command will run the script without specifying any ignored files or output file name. The script will use the default output file name, data.txt.
test@computer % ./save.sh This command will run the script and specify an output file name, my_data.md.
test@computer % ./save.sh --output my_data.mdThis command will run the script, ignoring the __test__ folder and package-lock.json file. The output file will be named summarize.md.
test@computer % ./save.sh --ignore __test__ package-lock.json --output summarize.mdThis command will run the script, ignoring node_modules, package.json, webpack.config.js, src, __tests__, package-lock.json, and LICENSE. The output file will be named placeholder_documentation.md.
test@computer % ./save.sh --ignore node_modules package.json webpack.config.js src __tests__ package-lock.json LICENSE --output placeholder_documentation.md