From e8dd50b85e93f1baf0c909f2716177e052672ff5 Mon Sep 17 00:00:00 2001 From: Dimitri Kokkonis Date: Sat, 10 Aug 2019 19:56:02 +0200 Subject: [bash/gr] Translate Bash to greek (#3595) * Add greek translation for the HTML language * Correct typo in source file name * Translate Bash to greek --- bash.html.markdown | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'bash.html.markdown') diff --git a/bash.html.markdown b/bash.html.markdown index 0385c46d..856db706 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -11,13 +11,15 @@ contributors: - ["Rahil Momin", "https://github.com/iamrahil"] - ["Gregrory Kielian", "https://github.com/gskielian"] - ["Etan Reisner", "https://github.com/deryni"] - - ["Jonathan Wang", "https://github.com/Jonathansw"] + - ["Jonathan Wang", "https://github.com/Jonathansw"] - ["Leo Rudberg", "https://github.com/LOZORD"] - ["Betsy Lorton", "https://github.com/schbetsy"] - ["John Detter", "https://github.com/jdetter"] - ["Harry Mumford-Turner", "https://github.com/harrymt"] - ["Martin Nicholson", "https://github.com/mn113"] filename: LearnBash.sh +translators: + - ["Dimitri Kokkonis", "https://github.com/kokkonisd"] --- Bash is a name of the unix shell, which was also distributed as the shell @@ -67,7 +69,7 @@ echo '$Variable' # => $Variable # Parameter expansion ${ }: echo ${Variable} # => Some string # This is a simple usage of parameter expansion -# Parameter Expansion gets a value from a variable. +# Parameter Expansion gets a value from a variable. # It "expands" or prints the value # During the expansion time the value or parameter can be modified # Below are other modifications that add onto this expansion @@ -87,7 +89,7 @@ echo ${Variable: -5} # => tring echo ${#Variable} # => 11 # Default value for variable -echo ${Foo:-"DefaultValueIfFooIsMissingOrEmpty"} +echo ${Foo:-"DefaultValueIfFooIsMissingOrEmpty"} # => DefaultValueIfFooIsMissingOrEmpty # This works for null (Foo=) and empty string (Foo=""); zero (Foo=0) returns 0. # Note that it only returns default value and doesn't change variable value. @@ -244,7 +246,7 @@ cp -r srcDirectory/ dst/ # recursively copy # `mv` is also useful for renaming files! mv s0urc3.txt dst.txt # sorry, l33t hackers... -# Since bash works in the context of a current directory, you might want to +# Since bash works in the context of a current directory, you might want to # run your command in some other directory. We have cd for changing location: cd ~ # change to home directory cd # also goes to home directory @@ -280,7 +282,7 @@ for line in sys.stdin: EOF # Variables will be expanded if the first "EOF" is not quoted -# Run the hello.py Python script with various stdin, stdout, and +# Run the hello.py Python script with various stdin, stdout, and # stderr redirections: python hello.py < "input.in" # pass input.in as input to the script @@ -322,7 +324,7 @@ rm -r tempDir/ # recursively delete # current directory. echo "There are $(ls | wc -l) items here." -# The same can be done using backticks `` but they can't be nested - +# The same can be done using backticks `` but they can't be nested - #the preferred way is to use $( ). echo "There are `ls | wc -l` items here." @@ -442,8 +444,8 @@ grep "^foo.*bar$" file.txt | grep -v "baz" # and not the regex, use fgrep (or grep -F) fgrep "foobar" file.txt -# The `trap` command allows you to execute a command whenever your script -# receives a signal. Here, `trap` will execute `rm` if it receives any of the +# The `trap` command allows you to execute a command whenever your script +# receives a signal. Here, `trap` will execute `rm` if it receives any of the # three listed signals. trap "rm $TEMP_FILE; exit" SIGHUP SIGINT SIGTERM -- cgit v1.2.3 From fb76c0b7fed31d7630023b85453a38a01802d026 Mon Sep 17 00:00:00 2001 From: lemonez <36384768+lemonez@users.noreply.github.com> Date: Thu, 16 Apr 2020 17:37:30 -0700 Subject: fix small typo pass -e flag to echo to interpret escape characters correctly --- bash.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bash.html.markdown') diff --git a/bash.html.markdown b/bash.html.markdown index 856db706..00ee0632 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -225,7 +225,9 @@ cat file.txt # We can also read the file using `cat`: Contents=$(cat file.txt) -echo "START OF FILE\n$Contents\nEND OF FILE" # "\n" prints a new line character +# "\n" prints a new line character +# "-e" to interpret the newline escape characters as escape characters +echo -e "START OF FILE\n$Contents\nEND OF FILE" # => START OF FILE # => [contents of file.txt] # => END OF FILE -- cgit v1.2.3 From 6955861bbadd3b5e1cbe615c665186ec399b35e7 Mon Sep 17 00:00:00 2001 From: oliv37 Date: Mon, 20 Apr 2020 20:35:47 +0200 Subject: Add indirect expansion in bash.html.markdown --- bash.html.markdown | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bash.html.markdown') diff --git a/bash.html.markdown b/bash.html.markdown index 856db706..407b237b 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -88,6 +88,11 @@ echo ${Variable: -5} # => tring # String length echo ${#Variable} # => 11 +# Indirect expansion +OtherVariable="Variable" +echo ${!OtherVariable} # => Some String +# This will expand the value of the OtherVariable + # Default value for variable echo ${Foo:-"DefaultValueIfFooIsMissingOrEmpty"} # => DefaultValueIfFooIsMissingOrEmpty -- cgit v1.2.3 From 7f1dc6ce2bde538ecaa8e8c51449215a75440d9d Mon Sep 17 00:00:00 2001 From: oliv37 Date: Mon, 20 Apr 2020 20:42:18 +0200 Subject: fix typo bash.html.markdown --- bash.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash.html.markdown') diff --git a/bash.html.markdown b/bash.html.markdown index 407b237b..0adc2efe 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -91,7 +91,7 @@ echo ${#Variable} # => 11 # Indirect expansion OtherVariable="Variable" echo ${!OtherVariable} # => Some String -# This will expand the value of the OtherVariable +# This will expand the value of OtherVariable # Default value for variable echo ${Foo:-"DefaultValueIfFooIsMissingOrEmpty"} -- cgit v1.2.3 From 211ec4f50bbd902c219e639d31cb1afec17e4f84 Mon Sep 17 00:00:00 2001 From: kevinnls <57634663+kevinnls@users.noreply.github.com> Date: Sat, 1 Aug 2020 21:24:19 +0530 Subject: removed MacOS from intro MacOS no longer ships bash as the default shell --- bash.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bash.html.markdown') diff --git a/bash.html.markdown b/bash.html.markdown index 59aeaaf4..7ca4285b 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -23,7 +23,7 @@ translators: --- Bash is a name of the unix shell, which was also distributed as the shell -for the GNU operating system and as default shell on Linux and Mac OS X. +for the GNU operating system and as the default shell on most Linux distros. Nearly all examples below can be a part of a shell script or executed directly in the shell. @@ -231,7 +231,7 @@ cat file.txt # We can also read the file using `cat`: Contents=$(cat file.txt) # "\n" prints a new line character -# "-e" to interpret the newline escape characters as escape characters +# "-e" to interpret the newline escape characters as escape characters echo -e "START OF FILE\n$Contents\nEND OF FILE" # => START OF FILE # => [contents of file.txt] -- cgit v1.2.3