diff --git a/args-reversed.sh b/args-reversed.sh new file mode 100644 index 0000000..89aa224 --- /dev/null +++ b/args-reversed.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then exit 1; fi + +for ((i=$#;i>0;i--)) +do + eval echo -n " \$$i " + echo -n " " +done + +echo \ No newline at end of file diff --git a/tabledata/ex1.sh b/tabledata/ex1.sh index 588322b..800591c 100755 --- a/tabledata/ex1.sh +++ b/tabledata/ex1.sh @@ -1,6 +1,6 @@ #!/bin/bash # iterating line-by-line over the input file -numOfPeople=`cat $1 | grep 'Poland' | wc -l` +numOfPeople=`cat $1 | grep "$2" | wc -l` -echo "Num. of people from Poland is $numOfPeople" +echo "Num. of people from $2 is $numOfPeople" diff --git a/tabledata/screenshare b/tabledata/screenshare deleted file mode 100644 index 029b907..0000000 --- a/tabledata/screenshare +++ /dev/null @@ -1 +0,0 @@ -https://meet.jit.si/unixsysop