ll

ll is a small bash script, an combination of “ls -ahls“, “zmore” and “clear“.

just do this:
1.
vi /bin/ll

2.

then paste this:

#!/bin/bash
clear

# parameter 2 is set.
if [ ! -z "$2" ]
then
    echo "grep"

    R=$(ls -ahls $1 | grep -i -c $2)
    ls -ahls --color=auto $1 | grep -i $2

    if [ "$R" -eq 1 ]
    then # Script needs at least one command-line argument.
        echo "$R"
        echo `ls $1 | grep -i $2`
        cat `ls $1 | grep -i $2` | zmore
    fi

else

    R=$(ls -ahls $1 --color=auto | grep -c ".")
    ls -ahls $1 --color=auto

    if [ "$R" -eq 1 ]
    then # Script needs at least one command-line argument.
        echo "$R"
        echo `ls "$1"`
                cat "`ls "$1"`" | zmore
    fi

fi

#_#END_FILE#_#

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.