0% found this document useful (0 votes)
49 views1 page

UNIX Shell Programming Solutions

The document contains solutions for UNIX Shell Programming, specifically for question 10. It includes a Perl program that converts a number from decimal to binary, demonstrating the use of hexadecimal and binary formatting. The solutions are allocated a total of 20 marks.

Uploaded by

Satish B basapur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views1 page

UNIX Shell Programming Solutions

The document contains solutions for UNIX Shell Programming, specifically for question 10. It includes a Perl program that converts a number from decimal to binary, demonstrating the use of hexadecimal and binary formatting. The solutions are allocated a total of 20 marks.

Uploaded by

Satish B basapur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Signature of Scrutinizer

Subject Title: UNIX Shell Programming Subject Code: IS34


[Link]. Solutions Marks
Allotted
10.a)

10M

10.b) Perl program to convert a number from decimal to binary 10M


for ($i = 0; $i < @ARGV; $i++) {
$val = hex($ARGV[$i]);
printf("0x%x\t= %d\t= 0b%b\n", $val, $val, $val);
}

IS34-UNIX and Shell Programming (Scheme and Solution) Page 5

You might also like