RAM one table colums a1,a2,a3,a4 respective values 2,4,7,8
KRISH one table colums a1,a2,a3,a4 respective values 3,4,6,9
IN RAM & KRISH a4 column if comparing values RAM A4 - KRISH
A4 ( 8-9 =1 THEN print 5 or (RAM) a4 value 10 KRISH a4
values 2 then 10 -2 =8 print 5*8=40 or diff 5 print same

Answer Posted / hemanth

x=`cut -f4 ram.txt`
y=`cut -f5 krish.txt`
z=`expr x-y`
if (z==5)
then echo 5
else
w= `expr 5*z`
echo $w
fi

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sh in shell script?

577


What is shell terminal?

552


How can I set the default rwx permission to all users on every file which is created in the current shell?

911


What is the significance of $#?

593


What is $1 in shell scripting?

593






Where is bash history?

508


How do I run a .sh file?

620


What are the advantages of using shell scripts?

587


What is computer cli?

499


Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.

803


How do you create a shortcut in linux?

597


What is shell and shell script?

558


Which is better perl or shell scripting?

561


What does debug script mean?

554


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

939