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
1. You are working as a designer for a university that offers a program in Computer Science. One of the tracts is computer security. One of your colleagues has recommended adding a

A large logistics company requires a software system to support the business processes associated with managing shift patterns of employees and making the associated payments. The


Windows Presentation Foundation Designed by Microsoft Technologies, the Microsoft Technologies windows Display Groundwork (or WPF) is a computer-software graphic subsystem for maki

i doing a project about depth estimation, i have done some research, and i used the block matching algorithm to get the motion vectors from the image sequences, i now have the prob

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Write a program that draws the initials J G P on the form similar to that shown in Fig J 1 (using straight lines and curve semicircles). The figure can not have corners. All ends a

1. A readme.txt file with: a. Instructions on how to compile and run your client and server code on the command line. (Also provide shell scripts if the commands are complicated

Complete the following program to move a value of 0xFFH to PORTB LIST p=18f4550 #include org 0x0000 movlw 0x00 _________ movlw 0xFF movwf PORTB end .