Sponsored Content
Top Forums Shell Programming and Scripting Unix Shell scripting, removing hex 0d 0a Post 302483669 by mrsindhe87 on Tuesday 28th of December 2010 04:28:10 AM
Old 12-28-2010
Bug Unix Shell scripting, removing hex 0d 0a

hi,
I have a file with data like this :
Code:
5963491,11926750,Policy Endorsement 1
Policy Endorsement 2
Policy Endorsement 3
Policy Endorsement 4
Policy Endorsement 5
Policy Endorsement 6
Policy Endorsement 7
5963492,11926751,Product[0].Quote Options[0].CoPolicy[0].CoLobs[0].CoLob[0].LwPolInput[0].LwXsLayerInfoRpt[0].LwXsLayerInfo[1].LwXsLayerCode
5963492,11926752,2
5963493,11926753,Product[0].Quote Options[0].SW Selected Forms[2].SW Selected Form Default

I want it to be like this:
Code:
5963491,11926750,Policy Endorsement 1 Policy Endorsement 2 Policy Endorsement 3 Policy Endorsement 4 Policy Endorsement 5 Policy Endorsement 6 Policy Endorsement 7
5963492,11926751,Product[0].Quote Options[0].CoPolicy[0].CoLobs[0].CoLob[0].LwPolInput[0].LwXsLayerInfoRpt[0].LwXsLayerInfo[1].LwXsLayerCode
5963492,11926752,2
5963493,11926753,Product[0].Quote Options[0].SW Selected Forms[2].SW Selected Form Default


There are few lines of data which needs to be append to the previous line. That is, the line should commence by a 7 or 8 digit number.
When i see the hex format of file (od -x file 1 ) , it contains 0d 0a. I want it to be only 0d. dos2unix wasn't much of a help. Appreciate your help. thanks


Moderator's Comments:
Mod Comment Please use code tags when posting data and code samples!

Last edited by Franklin52; 12-29-2010 at 09:23 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix shell scripting

I need to write a script which analyses an invoice file, counting the amount of pages in the file to be printed per account number and per invoice. The account numbers are stored in another file which has instructions on what do with ach customers invoice as per their account number. please... (6 Replies)
Discussion started by: la_burton
6 Replies

2. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

3. Shell Programming and Scripting

Unix shell scripting

Hi, we are writing this fields dynamically retrieved from database and writing into the file. $bmpRec = $bmpRec.'|'.$cust_id; # sp4 $bmpRec = $bmpRec.'|'.$serv_id; # sp5 $bmpRec = $bmpRec.'|'.$site_id; # sp6 $bmpRec = $bmpRec.'|'.$loc_id; # sp7 ... (4 Replies)
Discussion started by: Maruthi Kunnuru
4 Replies

4. UNIX for Advanced & Expert Users

Need your Help on Unix Shell Scripting.........

Hi Friends, 1. Bash Shell Scrpt to take backup at evening 2. I need a bash shell script for killing all processes. (5 Replies)
Discussion started by: vinayraj
5 Replies

5. Shell Programming and Scripting

Removing the entire file contents using unix shell script.

I need to remove the entire file contents in file using the shell script. Actually the grap -v command will create one more file and it occupy the space also. I need to remove the entire file contents without creating new file using the shell scripting. Please help me. (5 Replies)
Discussion started by: praka
5 Replies

6. Shell Programming and Scripting

Unix shell scripting

Hi All, I have one file called date1.txt and it contains dates like 130112 140112 150112 160112 170112 180112 190112 201012 so i need a script to read this file line by line and find out the day of each date and assign this value in one variable. And validate Weekday="Mon" then... (4 Replies)
Discussion started by: vichuelaa
4 Replies

7. UNIX for Dummies Questions & Answers

Unix Shell Scripting( Calling from Unix to PLSQL)

Hello Experts, I have the following questions to be discussed here at this esteemed discussion forum. I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies

8. UNIX for Dummies Questions & Answers

Unix Shell Scripting

I'm sorry if this doesn't go here, but I'm in depserate need of help with my last unix homework. Anyways, I'm taking summer classes, and one of them is UNIX. I've understood everything thus far, but I'm having a killer time with how my instructor has worded the problems for shell scripting. I... (3 Replies)
Discussion started by: dw15
3 Replies

9. Programming

unix Shell scripting

Hi All, need help to complete the automation but stuck at a perticular situation below is the code <code> fixed_function_name { code.... code.... variable_map= { a="/a" b="/b" c="/c" so on... } (7 Replies)
Discussion started by: yadavricky
7 Replies

10. UNIX for Beginners Questions & Answers

UNIX Shell Scripting

Describe in short the word completion feature of the tcsh Completion works anywhere in the command line, not at just the end, for both commands and filenames. Type part of a word and hit the Tab key, and the shell replaces the incomplete word with the complete one in the input buffer. The... (1 Reply)
Discussion started by: Elena Lauren
1 Replies
tpm_restrictpubek(8)					      System Manager's Manual					      tpm_restrictpubek(8)

							TPM Management - tpm_restrictpubek

NAME
tpm_restrictpubek - restrict the ability to display the public portion of the Endorsement Key to the owner SYNOPSIS
tpm_restrictpubek [OPTION] DESCRIPTION
tpm_restrictpubek reports the status of who can display the public portion of the Endorsement Key. This is the default behavior and also available with the --status option. This operation will be in effect until the owner is cleared and prompts for the owner passord. With the --restrict option, the ability to display the public portion of the Endorsement Key is resticted to the owner (via the TPM_DisablePubekRead API). The command prompts for the owner password to complete the operation. The --status and --restrict options are mutually exclusive and the last one on the command line will be carried out. -h, --help Display command usage info. -v, --version Display command version info. -l, --log [none|error|info|debug] Set logging level. -u, --unicode Use TSS UNICODE encoding for passwords to comply with applications using TSS popup boxes -s, --status Display the status of who can see the public portion of the Endorsement Key -r, --restrict Restrict seeing the public portion of the Endorsement Key to the owner -z, --well-known Authenticate using 20 bytes of zeros as owner password (the default TSS Well Known Secret), instead of prompting for an owner password. SEE ALSO
tpm_version(1), tpm_takeownership(8), tpm_getpubek(8), tcsd(8) REPORTING BUGS
Report bugs to <trousers-users@lists.sourceforge.net> TPM Management 2005-05-05 tpm_restrictpubek(8)
All times are GMT -4. The time now is 04:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy