1.Write a script, which converts a number from binary to
hexadecimal format or vice versa.

Answer Posted / pradipta

echo 'obase=16 ; ibase =2 ; binaryno'|bc #print hexadecimal
echo 'obase=2 ; ibase=16; hexa no'|bc #print binary no

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between grep and egrep?

597


What is the use of "$?" Sign in shell script?

607


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

742


What is bash command used for?

572


How do I start a shell script?

561






What is shell and shell script?

550


What does it mean to debug a script?

563


How can I send a mail with a compressed file as an attachment?

552


Which is better perl or shell scripting?

548


What happens on a system call?

549


How to print pid of the current shell?

593


Why do we write bin bash in shell scripts?

539


How do I run a shell script in powershell?

547


What is a file basename?

584


What language is bash written in?

550