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



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

Answer / 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

More Shell Script Interview Questions

write a scwipt that a) takes exactly one argument, a directory name. b) if the number of argument is more or less than one,print a usage message c) if the argument is not adirectory, print another message d) for the given directory, print the five biggest files and the five files that were most recently modified. e) save the output to a file called q2output.

2 Answers  


What is a shell made of?

0 Answers  


How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }

0 Answers   Wipro,


write a non recursive shell script that accepts any number of arguments and prints them in the reverse order

3 Answers  


How to get the last line from a file using just the terminal?

0 Answers  


Explain about sourcing commands?

0 Answers  


What does echo mean in scripting?

0 Answers  


If you have a string "one two three", which shell command would you use to extract the strings?

5 Answers  


Write a command sequence to find the count of each word?

0 Answers  


What does $@ mean bash?

0 Answers  


What is web script?

0 Answers  


write a shell script to check the failed jobs?

0 Answers   Wells Fargo,


Categories