# problem when decoding a binary file

**URL:** <https://community.unix.com/t/problem-when-decoding-a-binary-file/198918>\
**Category:** Solaris\
**Created:** [May 29, 2008, 7:33am UTC](https://community.unix.com/t/problem-when-decoding-a-binary-file/198918 "2008-05-29T07:33:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vamshikrishnab](https://community.unix.com/letter_avatar/vamshikrishnab/32/5_5575768a8748004e209b776fc1b2916d.png) [@vamshikrishnab](https://community.unix.com/u/vamshikrishnab)\
**Post date:** [May 29, 2008, 7:33am UTC](https://community.unix.com/t/problem-when-decoding-a-binary-file/198918/1 "2008-05-29T07:33:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![era](https://community.unix.com/letter_avatar/era/32/5_5575768a8748004e209b776fc1b2916d.png) [@era](https://community.unix.com/u/era)\
**Post date:** [May 29, 2008, 8:01am UTC](https://community.unix.com/t/problem-when-decoding-a-binary-file/198918/2 "2008-05-29T08:01:51Z")

</div>

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:

```nohighlight
$ 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.

---

<div class="post-metadata">

**Author:** ![vamshikrishnab](https://community.unix.com/letter_avatar/vamshikrishnab/32/5_5575768a8748004e209b776fc1b2916d.png) [@vamshikrishnab](https://community.unix.com/u/vamshikrishnab)\
**Post date:** [May 29, 2008, 8:10am UTC](https://community.unix.com/t/problem-when-decoding-a-binary-file/198918/3 "2008-05-29T08:10:41Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![era](https://community.unix.com/letter_avatar/era/32/5_5575768a8748004e209b776fc1b2916d.png) [@era](https://community.unix.com/u/era)\
**Post date:** [May 29, 2008, 8:13am UTC](https://community.unix.com/t/problem-when-decoding-a-binary-file/198918/4 "2008-05-29T08:13:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![snowline84](https://community.unix.com/letter_avatar/snowline84/32/5_5575768a8748004e209b776fc1b2916d.png) [@snowline84](https://community.unix.com/u/snowline84)\
**Post date:** [May 29, 2008, 10:33am UTC](https://community.unix.com/t/problem-when-decoding-a-binary-file/198918/5 "2008-05-29T10:33:08Z")

</div>

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