Sponsored Content
Full Discussion: Decode a file
Top Forums UNIX for Beginners Questions & Answers Decode a file Post 303036439 by vgersh99 on Wednesday 26th of June 2019 11:13:23 AM
Old 06-26-2019
I don't quite follow what you're after.
Could you try to elaborate one more time, please.
A sample input and output could help as well.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please decode in English

Hello: Can anyone please decode this script in English. I have also made some comments which I know.. The actual script does not have one comment also.. #! /bin/ksh . odbmsprd_env.ksh #setting the env.. echo $0 Started at : `date '+%d-%m-%Y %H:%M:%S'` # what's echo $0 ... (4 Replies)
Discussion started by: ST2000
4 Replies

2. Shell Programming and Scripting

Decode email

In pine email, when you receive an email with an attachment, the content of the attachment is incoded (content-transfer-encoding: base64). I am trying to write a shell script that will read the mail file, and it will save the attachment of an email to a directory. I want to do this by reading... (6 Replies)
Discussion started by: mskarica
6 Replies

3. Shell Programming and Scripting

auto decode a value to different value

Okay, This is not something I've tried to do before, but what I want (need) to do is when a value is read in it gets changed to the value needed. I've been given a list of ids that I need to check against the ids I have in my system, but as is the case we don't have the same naming convention... (2 Replies)
Discussion started by: nhatch
2 Replies

4. Shell Programming and Scripting

DECODE file field is required in Bash

Dear All, I want to decode the one of the file field. Input file: 9393939393|999|2009-02-20 00:00:01|2||4587|2007-02-28 00:00:01|0 9393939393|2001|2009-02-20 00:00:01|2||4587|2007-02-28 00:00:01|0 9393939393|1500|2009-02-20 00:00:01|2||4587| 2007-02-28 00:00:01|0... (1 Reply)
Discussion started by: hanu_oracle
1 Replies

5. Programming

How to Decode an image using openGL

Hi, How to decode an image using openGL library libjpeg .. which are the steps needed to do this using C language.. actually my work is to decode the image, store it on the buffer, and place it on cube surface.. please guide me,,any answer will appreciated .. (8 Replies)
Discussion started by: Ravikishore
8 Replies

6. UNIX for Advanced & Expert Users

How to decode nfs file handle in HP-UX?

Hi Experts, Any idea how to decode file handle in HP-UX? I am getting the following error continously in my HP-UX 11.31 box :mad: Apr 26 07:15:00 host62 su: + tty?? root-bb Apr 26 07:15:00 host62 su: + tty?? root-abcadm Apr 26 07:15:01 host62 vmunix: NFS write error on host peq9vs:... (1 Reply)
Discussion started by: vipinable
1 Replies

7. Linux

Decode the statement!!

What will the below statement do ?:confused: && { && {eval `/bin/setup 1`} || && { VAR="/tmp" } export $VAR; } (3 Replies)
Discussion started by: krishnaux
3 Replies

8. Shell Programming and Scripting

How to decode text files?

HI experts....I am trying to decode some text files... I need little help from you people...file is of mixed type...from generated from windows based system my text files looks like this... 2.AUBZ 158 1 11 116204310 6 N 7542 E 18 02846 52833 102821 152815 ... (9 Replies)
Discussion started by: Akshay Hegde
9 Replies

9. UNIX for Dummies Questions & Answers

What does this command do? and how to decode all other lines

Hello, I have an encoded file and I wish to see what is written inside. The first line is given below: eval "$(dd if=$0 bs=1 skip=69 2>/dev/null|gpg -d 2>/dev/null)"; exit PS: When I google above code, it says that command is use for encryption... Following lines include many strange... (2 Replies)
Discussion started by: baris35
2 Replies

10. Windows & DOS: Issues & Discussions

Decode windows .dat file

I have received a file from a Windows server that in Linux hexedit shows the following first few characters. AA 18 3C 2B 60 56 03 00 00 01 01 00 The Windows program may have received this via RS232. I need to "understand" this on a Linux machine. Please suggest where I may start decoding... (4 Replies)
Discussion started by: Alf Stockton
4 Replies
rawtopgm(1)						      General Commands Manual						       rawtopgm(1)

NAME
rawtopgm - convert raw grayscale bytes into a portable graymap SYNOPSIS
rawtopgm [-bpp [1|2]] [-littleendian] [-maxval N] [-headerskip N] [-rowskip N] [-tb|-topbottom] [width height] [imagefile] DESCRIPTION
Reads raw grayscale values as input. Produces a PGM file as output. The input file is just a sequence of pure binary numbers, either one or two bytes each, either bigendian or littleendian, representing gray values. They may be arranged either top to bottom, left to right or bottom to top, left to right. There may be arbitrary header information at the start of the file (to which rawtopgm pays no attention at all other than the header's size). Arguments to rawtopgm tell how to interpret the pixels (a function that is served by a header in a regular graphics format). The width and height parameters tell the dimensions of the image. If you omit these parameters, rawtopgm assumes it is a quadratic image and bases the dimensions on the size of the input stream. If this size is not a perfect square, rawtopgm fails. When you don't specify width and height, rawtopgm reads the entire input stream into storage at once, which may take a lot of storage. Otherwise, rawtopgm ordinarily stores only one row at a time. If you don't specify imagefile, or specify -, the input is from Standard Input. The PGM output is to Standard Output. OPTIONS
-maxval N N is the maxval for the gray values in the input, and is also the maxval of the PGM output image. The default is the maximum value that can be represented in the number of bytes used for each sample (i.e. 255 or 65535). -bpp [1|2] tells the number of bytes that represent each sample in the input. If the value is 2, The most significant byte is first in the stream. The default is 1 byte per sample. -littleendian says that the bytes of each input sample are ordered with the least significant byte first. Without this option, rawtopgm assumes MSB first. This obviously has no effect when there is only one byte per sample. -headerskip N rawtopgm skips over N bytes at the beginning of the stream and reads the image immediately after. The default is 0. This is useful when the input is actually some graphics format that has a descriptive header followed by an ordinary raster, and you don't have a program that understands the header or you want to ignore the header. -rowskip N If there is padding at the ends of the rows, you can skip it with this option. Note that rowskip need not be an integer. Amaz- ingly, I once had an image with 0.376 bytes of padding per row. This turned out to be due to a file-transfer problem, but I was still able to read the image. Skipping a fractional byte per row means skipping one byte per multiple rows. -bt -bottomfirst By default, rawtopgm assumes the pixels in the input go top to bottom, left to right. If you specify -bt or -bottomfirst, rawtopgm assumes the pixels go bottom to top, left to right. The Molecular Dynamics and Leica confocal format, for example, use the latter arrangement. If you don't specify -bt when you should or vice versa, the resulting image is upside down, which you can correct with pnmflip . This option causes rawtopgm to read the entire input stream into storage at once, which may take a lot of storage. Ordinarly, raw- topgm stores only one row at a time. For backwards compatibility, rawtopgm also accepts -tb and -topbottom to mean exactly the same thing. The reasons these are named backwards is that the original author thought of it as specifying that the wrong results of assuming the data is top to bottom should be corrected by flipping the result top for bottom. Today, we think of it as simply specifying the format of the input data so that there are no wrong results. SEE ALSO
pgm(5), rawtoppm(1), pnmflip(1) AUTHORS
Copyright (C) 1989 by Jef Poskanzer. Modified June 1993 by Oliver Trepte, oliver@fysik4.kth.se 14 September 2000 rawtopgm(1)
All times are GMT -4. The time now is 03:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy