Script shell to display lines of a file in reverse order, Programming Languages

W.A.S.S to display all the lines of a file in reverse order.

 

Program

 

# W.A.S.S to display all the lines of a file in reverse order.

 len=`cat good.sh | wc -l`

while test $len -gt 0

do

clen=`head -n$len good.sh | tail -n1 | wc -c`

clen=`expr $clen - 1`

while test $clen -gt 0

do

    ch=`head -n$len good.sh | tail -n1 | cut -c$clen`

    echo -e "$ch\c"

    clen=`expr $clen - 1`

done

echo ""

len=`expr $len - 1`

done

 

Output

 

fi

fi

   echo "Good Morning!"

else

    echo "Good Afternoon!"

then

   if test $str -gt 12

else

 

   echo "Good Evening!"

then

if test $str -gt 16

str=`date +%k`

Posted Date: 9/26/2012 7:59:32 AM | Location : United States







Related Discussions:- Script shell to display lines of a file in reverse order, Assignment Help, Ask Question on Script shell to display lines of a file in reverse order, Get Answer, Expert's Help, Script shell to display lines of a file in reverse order Discussions

Write discussion on Script shell to display lines of a file in reverse order
Your posts are moderated
Related Questions
i have a database having field name title and comm. I want to search by name and get the all data remaining title and comm(comm is integer)

XYZ International is a large Institute; Management in this institute wants to create Proper Student management System. There for they contact you and asked you to create Propto typ

,how to write matlab program for fast decoupled method

Detailed Description: • The program will take temperature readings as input from user for specified number of consecutive days. • Program will store these temperature values into

Using the concept of structures, write a program to assign passenger seats in an airplane. Assume a small airplane with seats numbered as follows: 1 A B C D 2 A B C D 3 A

What is DOM? The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure an

The aim of this task is to gain experience in using the popular Web languages XSLT, XQuery, DTD, XML Schema and RDF. The Content: The University is organizing a stage show wh

Task 1 Think about a Web site you would like to work on for Assignment 2. For example, you can do a personal interest site, a site for your favourite nonprofit organization,

1.  Develop HTML code to create a Web page with the red background and title "My First Page" in any other color. 2.  Develop an HTML document with details of your name, telephon

Vacation Envy - Travel and Photo Sharing Website Site Overview- Vacation Envy is a travel as well as photo-sharing site. Make your travel map, share photos and show off al