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
Man, i''m having quite a problem with this exercise. Even googled for Roman multiply table concept. I just don''t get it. Multiply two numbers given in Roman figures. For instan

Suppose L is a context-free language and L' is regular. Show that L∩ L' is a context- free language. Specifically, if you're given a PDA diagram of L and a DFA diagram for L' , des

Example : Find the general solution to the subsequent differential equation. x 2 y′′ - 7 xy′ + 16 y= 0   Solution First the roots of (3)  r (r -1) - 7r + 16= 0 r 2

Can you please make my assignment in 3 days?I will pay you good

Web Services Information Language WCF is designed using assistance focused structure concepts to support allocated processing where solutions have distant customers. Customers can

Procedure-oriented programming (POP):- This is a top-down programming approach, where the problem is viewed as a sequence of tasks to be done such as calculating, printing etc. A n

Object-oriented programming paradigm Object  Oriented  Programming  is  an  aproach  in  which  a  program  is  viewed  as  a  dynamic  network  of collaborating objects, where

I do have an assignment in operating systems programming ... how can i attach my file?

Please explain about sub programming.

One of the main strengths of the Perl programming language are its powerful text manipulation features. In this assignment, you will put them to use for writing a Perl program tha