Questions

1:Write a function named toLower that converts its arguments to all lowercase and outputs the converted string to STDOUT. (HINT: Use tr.)
2:Write a function named toUpper that converts its arguments to all uppercase and outputs the converted string to STDOUT. (HINT: Use tr.)
3:Write a function called isSpaceAvailable to check whether a directory contains a certain amount of disk space.

The function should accept two arguments. The first one indicates the directory to check, and the second one indicates the amount of space to check. The function should return 1 if both arguments are not supplied or if the first argument is not a directory.

If sufficient space is present, your function should return 0. This enables you to use it as follows: ...

Get Sams Teach Yourself Shell Programming in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.