problem when decoding a binary file

I tried to decode a binary script using the command 'uudecode'. but it is giving error as 'No begining line'.

'uudecode -o <outfile name> <binary file>'

Please help me in resolving this.

uudecode expects a file in uuencode format, and complains if you feed it something else. Perhaps you are actually looking for the uuencode command?

When you encode something with uuencode, the result looks like this:

$ uuencode /etc/mailname file.txt
begin 644 file.txt
):6-K>2!P;V\*
`
end

(I just picked a suitable short file to use as an example.)

The decode program will extract the stuff between "begin" and "end" into the file name defined on the begin line, with the requested permissions. If the input does not contain data in this format, you are doing something wrong.

My binary file does not contain the begin and end line.

Is there any other way to convert the file to normal file.

It is not clear what you are trying to accomplish. I already suggested uuencode if your goal is to make the file suitable for sending as a text file over email. What do you mean by a "normal file"? What is the problem you are trying to solve and where does the problematic file come from?

I think upy can use strings -a for the same.