[Toybox] Add -m option to mkdir

Bastian Bittorf bittorf at bluebottle.com
Sun Dec 23 11:31:10 PST 2012


* Felix Janda <felix.janda at posteo.de> [23.12.2012 20:23]:
> Hi,
> 
> of created directory), the other adds a test script for it. The test script
> uses the non-standard command stat since it seems to be the right tool for
> determining permissions of directories.

i you really want to avoid 'stat' you could use something like:

case "$( ls -l "$file" )" in
	"-rwxr-xr-x"*)
		# true
	;;
	*)
		# error
	;;
esac

OR

ls -l "$file" | grep -q ^"-rwxr-xr-x" && ...


bye, bastian

 1356291070.0


More information about the Toybox mailing list