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

Cobol program, need someone to write a simple cobol program for me..urgent

need someone to write a simple cobol program for me..urgent

Store an url in a dartabase, how to store an url in a dartabase(sql server ...

how to store an url in a dartabase(sql server 2005)? (or) create table b(url what is the datatype for url?

Frotran 2000, Please explain about sub programming.

Please explain about sub programming.

Linux Lab Assignments, I have a linux lab class that consist of 1 lab assig...

I have a linux lab class that consist of 1 lab assignment per week for 5 weeks. It is an online virtual lab and is fairly easy, I just don''t have the time.

Matlab help, i(t)=(V/R) * (1-e^-(R/L)(t)) (a) Defi ne an anonymous function...

i(t)=(V/R) * (1-e^-(R/L)(t)) (a) Defi ne an anonymous function answerE that returns i(t) given input t. (b) The fi nal value for the current is 2 amps. Find a time tm when the curr

Linux assignment , Hi how can I upload my hw to you experts?

Hi how can I upload my hw to you experts?

Laplace transforms, There actually isn't all that much to this section. All...

There actually isn't all that much to this section. All we are going to do now is work a quick illustration using Laplace transforms for a 3 rd order differential equation therefo

Prelude to Programming, How does a Case Structure differ from a Case struct...

How does a Case Structure differ from a Case structure program in pseudocode

Shell script to delete all files from system have size zero, Normal 0 ...

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

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