Little Girl's Mostly Linux Blog

BashTests

Bash tests

This page was last updated on April 4, 2012.

File Tests
nt Newer than
d is a directory
f is a file
r readable
w writeable
x executable
Logical Tests
&& logical AND
|| logical OR
! logical NOT
Numeric Tests
lt less than
gt greater than
eq equal to
ne not equal
ge greater or equal
le less or equal
String Tests
= equal to
z zero length
n not zero length


Obligatory Happy Ending

And they all lived happily ever after. The end.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: WordPress Classic. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.