Sponsored Content
Top Forums Shell Programming and Scripting DECODE file field is required in Bash Post 302290699 by hanu_oracle on Tuesday 24th of February 2009 02:59:13 AM
Old 02-24-2009
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
9393939393|999|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

Required output file:
9393939393|MRP_25|2009-02-20 00:00:01|2||4587|2007-02-28 00:00:01|0
9393939393|MRP_75|2009-02-20 00:00:01|2||4587|2007-02-28 00:00:01|0
9393939393|MRP_50|2009-02-20 00:00:01|2||4587| 2007-02-28 00:00:01|0
9393939393|MRP_25|2009-02-20 00:00:01|2||4587|2007-02-28 00:00:01| 0
9393939393|MRP_50|2009-02-20 00:00:01|2||4587|2007-02-28 00:00:01|0


Any option is there in UNIX, to decode the field & recreate the new file with the decoded value.


Regards
Hanuma
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting required fields from a test file in required fromat in unix

My data is something like shown below. date1 date2 aaa bbbb ccccc date3 date4 dddd eeeeeee ffffffffff ggggg hh I want the output like this date1date2 aaa eeeeee I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies

2. UNIX for Dummies Questions & Answers

Help required on printing the line if third field is not a empty space

Hi Experts, I want to print the lines whose third field in non-empty/blank space. i.e. INPUT FILE/B] dcdccghjrry0yd cont dcdccttrk820529 cont rdekedfsSCr dcdccttrdky2d0y cont rdekedfsSC2 ... (3 Replies)
Discussion started by: krao
3 Replies

3. Shell Programming and Scripting

How to filter required data from file using bash script?

Hi All , I have one file like below , Owner name = abu2-kxy-m29.hegen.app Item_id = AX1981, special_id = *NULL*, version = 1 Created = 09/01/2010 12:56:56 (1283389016) Enddate = 03/31/2011 00:00:00 (1301554800) From the above file I need to get the output in the below format ,i need... (3 Replies)
Discussion started by: gnanasekar_beem
3 Replies

4. 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

5. Shell Programming and Scripting

Bash file 1 and file then add field

Hi All, Seeking for your assistance regarding on how to bash file 1 and file 2 then add the field if the bash is true. Ex. nik1.csv - input file 1 1,0054,0001,4,5,6,7,May 1,USA 11,0053,0002,14,15,16,17,May 2,PHL 40,0052,0003,43,44,45,46,May 5,GER nik2.csv - input file 2... (11 Replies)
Discussion started by: nikki1200
11 Replies

6. Shell Programming and Scripting

Bash script to read a file from particular line till required line and process

Hi All, Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool. Wraper script am trying is to do with above metion 2 files. utility tool accepts : a. userinfo file : which contains username b. item file : which... (2 Replies)
Discussion started by: Optimus81
2 Replies

7. Shell Programming and Scripting

Bash interactive Script Required

Dear All, Please help in creating a bash script to fetch records from multiple files the script should ask inputs of file type and column level input(at least 4 col of each file type) I have 4 sort of Files, A,B,C,D. file names are like A_0112.unl, A_01215.unl, A_0001.unl and same with B C... (3 Replies)
Discussion started by: Muhammad Ali
3 Replies

8. 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

9. UNIX for Beginners Questions & Answers

Assistance required to decode sed search using /1

Hi, I am trying to extract line number (first number), as well as everything from TSVal onwards. 4 1.474005 172.18.124.142 -> 74.125.228.46 TCP 2450940617 74 44021 > https Seq=0 Win=5840 Len=0 MSS=1380 SACK_PERM=1 TSval=2450940617 TSecr=0 WS=64 6 1.488149 172.18.124.142 ->... (1 Reply)
Discussion started by: sand1234
1 Replies

10. UNIX for Beginners Questions & Answers

Decode a file

hi i have this file : <?xml version="1.0" encoding="UTF-8"?> <OnDemand xmlns="http://xsd.telecomitalia.it/Schema/crmws.entity.OnDemand" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xsd.telecomitalia.it/Schema/crmws.entity.OnDemand... (2 Replies)
Discussion started by: Francesco_IT
2 Replies
MHA-DECODE(1)						       MHonArc Documentation						     MHA-DECODE(1)

NAME
mha-decode - Decode MIME messages SYNOPSIS
mha-decode [options] mailfolder ... mha-decode [options] -single msg.822 DESCRIPTION
mha-decode is a utility program that is part of the MHonArc software package. mha-decode provides basic MIME decoding for mail messages. If given mail folders as input, all messages within in the mail folders will be decoded. All message parts are written to files. If a filename is specified for a message part, that filename will be used when writing the part to a file. If no filename is specified in the message, a unique name will be used based upon the content-type of the message part. A single message can be decoded by using the "-single" option. OPTIONS
mha-decode takes options available to mhonarc, but only those options affect parsing of mail folders are applicable: "-conlen", "-mhpattern", "-msgsep", "-noconlen", "-outdir", "-perlinc", "-rcfile", "-single", "-umask". Also, mha-decode supports the following additional options: "-dcd-digest" Run in message digest mode. When this option is specified, any embedded "message/rfc822" and "message/news" parts will be saved instead of recursively decoding any parts contained within. NOTES
The documentation for MHonArc is distributed in HTML format. Due to its size and organization, it is not suited for manpage format. Consult your system administrator for where the documentation has been installed, or see "AVAILABILITY" on where you can access the documentation on the web. AVAILABILITY
<http://www.mhonarc.org/> AUTHOR
Earl Hood, mhonarc@mhonarc.org MHonArc comes with ABSOLUTELY NO WARRANTY and MHonArc may be copied only under the terms of the GNU General Public License, which may be found in the MHonArc distribution. MHonArc v2.6 2003-07-19 MHA-DECODE(1)
All times are GMT -4. The time now is 02:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy