Created
March 20, 2019 23:15
-
-
Save AdryDev92/014574fbb9f3cd4c851f4427c0cee161 to your computer and use it in GitHub Desktop.
A simple script to create a file with a text of your choose in the location you want
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/zsh | |
#if you use bash, simply change /bin/zsh to /bin/bash | |
if [ "$1" = "-h" ]; then | |
echo "The correct way to use this script: | |
[arg1] = file name | |
./create-file [arg1]" | |
exit 0 | |
fi | |
echo "Write the name of file:" | |
read filename | |
echo "This is a random text that you can change for what you want" >> $filename.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment