Skip to content

Commit c9b3328

Browse files
committed
added -n flag and related docs to function examples
1 parent b49062a commit c9b3328

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bash_functions

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ using_function_arguments one two three four five six seven eight nine ten
6060
# returning values often uses global variables but this is not always
6161
# good form so function output is returned via STDOUT, Standard Output.
6262
function_that_returns_a_value() {
63-
echo "this string is discretely returned."
63+
64+
# Note that the "-n" flag causes echo to output without
65+
# appending a newline at the end of the given string.
66+
echo -n "this string is discretely returned."
6467
}
6568

6669
# prints output to STDOUT

0 commit comments

Comments
 (0)