From dde8a84262c04a29a8443478196513ce4c68369f Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 30 May 2015 23:27:03 +0200 Subject: [PATCH] Update learn.sh --- learn.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/learn.sh b/learn.sh index 70e5b2a..1e9dcb0 100644 --- a/learn.sh +++ b/learn.sh @@ -146,7 +146,6 @@ Your selection (number, c to continue): " [ "$editor" = "1" ] && learn_nano [ "$editor" = "2" ] && learn_vi done -set +H echo "Sublesson 3: echo. Echo is one of the basic tools that are most commonly used in bash scripting: it prints out a message to the user. This very message is printed using echo. @@ -178,9 +177,13 @@ Will print: `echo This will print \\\"echo \\\` it works! \\\` \\\\ \\\"` " press +echo 'If your phrase also includes a ! followed by a letter or number you should enclose the enclose the phrase in single quotes (\').' +press echo "To create a file using echo the usage is also very simple: echo \"This and this text will go to a text file.\" > file.txt +This will recreate the file. +To append the text, insert two >> instead of 1 > Of course, you can easily change the extension from txt to sh to create a shell script (just don't forget the shebang). "