[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Validating files and directories
From: |
irenezerafa |
Subject: |
Validating files and directories |
Date: |
Sat, 13 Nov 2021 00:22:18 +0000 |
I am using the following commands to validate a file or directory.
if [[ ! -f "$fl" && ! -d "$fl" ]]; then
printf '%s\n' "$fl: File or Directory does not exist"
fi
But have noticed that I can use -e to see if there's something by that name,
instead of separately testing -f and -d.
Yet I am getting confused between using -a and -e.
- Validating files and directories,
irenezerafa <=
- Re: Validating files and directories, Alex fxmbsw7 Ratchev, 2021/11/13
- Re: Validating files and directories, Alex fxmbsw7 Ratchev, 2021/11/13
- Re: Validating files and directories, Chris Elvidge, 2021/11/13
- Re: Validating files and directories, Greg Wooledge, 2021/11/13
- Validating files and directories, irenezerafa, 2021/11/13
- Re: Validating files and directories, Greg Wooledge, 2021/11/13
- Validating files and directories, irenezerafa, 2021/11/13
- Re: Validating files and directories, Chet Ramey, 2021/11/15
- Validating files and directories, irenezerafa, 2021/11/16
- Re: Validating files and directories, Chet Ramey, 2021/11/16