mirror of
https://github.com/alexanderepstein/Bash-Snippets
synced 2018-11-08 02:59:35 +01:00
Fix file output bug and enhance usage
This commit is contained in:
parent
89a4d1f32e
commit
3cc7264593
@ -120,6 +120,8 @@ printLyrics()
|
|||||||
if [[ "$answer" == [Yy] ]]; then
|
if [[ "$answer" == [Yy] ]]; then
|
||||||
echo -e "$lyrics" > $filePath;
|
echo -e "$lyrics" > $filePath;
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo -e "$lyrics" > $filePath;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -128,14 +130,17 @@ usage()
|
|||||||
{
|
{
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Lyrics
|
Lyrics
|
||||||
Description: Short desciption of the tool.
|
Description: Fetch lyrics for a certain song.
|
||||||
Usage: tool [flags] or tool [flags] [arguments]
|
Usage: lyrics [flags] or tool [-a] [arg] [-s] [arg]
|
||||||
|
-a Artist of the song to fetch lyrics for
|
||||||
|
-s Song of the artist to fetch lyrics for
|
||||||
|
-f Export the lyrics to file rather than outputting to stdout
|
||||||
-u Update Bash-Snippet Tools
|
-u Update Bash-Snippet Tools
|
||||||
-h Show the help
|
-h Show the help
|
||||||
-v Get the tool version
|
-v Get the tool version
|
||||||
Examples:
|
Examples:
|
||||||
tool
|
lyrics -a logic -s run it
|
||||||
tool
|
lyrics -a logic -s run it -f ~/runItLyrics.txt
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user