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

Assignment Help:

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`


Related Discussions:- Script shell to display lines of a file in reverse order

Implement a two-dimensional table in prolog, Implement a two-dimensional ta...

Implement a two-dimensional table in Prolog. Your program will contain: 1.  An insert_entry predicate that takes a table, row, column and an entry and inserts the entry at the g

C.., I am still waiting on a quote from you

I am still waiting on a quote from you

Windows card space, Windows Card Space Windows Card Space (codenamed Info C...

Windows Card Space Windows Card Space (codenamed Info Card), is Windows now-canceled customer application for the Identification Met system. Card Place is an instance of a class of

Asp.net support for ajax and javascript intellisense, ASP.NET Support for A...

ASP.NET Support for AJAX and JavaScript IntelliSense IntelliSense for Enthusiasm JScript makes it accessible client-script selection components in the value manager in Vision Facil

Matlab, I need to write code to compute matrix multiplication without usin...

I need to write code to compute matrix multiplication without using built in function.

Matlab, ,how to write matlab program for fast decoupled method

,how to write matlab program for fast decoupled method

Java program, Write a program to calculate amount after n number of years b...

Write a program to calculate amount after n number of years by inputting principal at the rate of 8% interest.

Hack winrar password, how to make a program using vb?seriously i don''t kno...

how to make a program using vb?seriously i don''t know

Html code to create a web page design , 1.  Develop HTML code to create a W...

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

Network security, Term project (you should code a function), demonstrate it...

Term project (you should code a function), demonstrate it to the class and a very breief report (one or two pages) describing what you did. You determine your project (could be imp

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd