Tag: bash

59 votes
30 answers
1.6K views
How can I check if a directory exists in a Bash shell script?

What command can be used to check if a directory exists or not, within a Bash shell script?

avatar
Louetta
0 1 0 9
asked 07 September, 2021
53 votes
21 answers
339 views
How to execute mongo commands through shell scripts?

I want to execute mongo commands in shell script, e.g. in a script test.sh: #!/bin/sh mongo myDbName db.mycol

avatar
Roger
0 1 0 9
asked 07 September, 2021