Bash example

Vincent Arnoux vincent.arnoux at gmail.com
Thu Aug 20 22:52:48 UTC 2009


On Fri, Aug 21, 2009 at 00:48, Chris<racerx at makeworld.com> wrote:
>> I would like an example bash script that checks to see if a directory
>> exists. If it does, then remove it.
> Actually, if many dirs exist, remove em all.

Just remove them, if they don't exist, no error will be raised:
#! /bin/bash

rm -fr mydir1 mydir2




More information about the ubuntu-users mailing list