Skip to content

Commit b04fdf4

Browse files
updated shell scripts
1 parent aa6f8a9 commit b04fdf4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# this is a comment on its own line
2+
echo 'hello' # and this is a comment after a command

example_files/shell_scripting/if_then_else.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if (( $# != 1 )) ; then
33
exit 1
44
else
55
if [[ ! -f $1 ]] ; then
6-
echo "Error! '$1' is not a valid file" 1>&2
6+
printf 'Error! %q is not a valid file\n' "$1" 1>&2
77
exit 1
88
else
99
echo "No. of lines in '$1' is $(wc -l < "$1")"

0 commit comments

Comments
 (0)