Logo  

CS469 - Linux and Unix Administration and Networking

Displaying exercises/e5/files/a.sh

#!/bin/bash

# List the files (non-hidden) found in the current directory with a leading
# index (formatted to three columns).  ex:
# > ./a.sh
#   1: a.sh
#   2: b.sh
#   3: c.sh

# Initialize an index variable to 1:

# Use a for - in loop with a wild-card to expand all the files in the current
# directory: