Sponsored Content
Top Forums Shell Programming and Scripting Convert int to string in python Post 302882379 by rossi on Monday 6th of January 2014 12:07:26 PM
Old 01-06-2014
My data is like this :

Code:
chr12   21007916        21377807        369.89  -3.12   RP11-125O5.2
chr12   21007916        21377807        369.89  -3.12   SLCO1B1
chr12   21007916        21377807        369.89  -3.12   SLCO1B3
chr12   21007916        21377807        369.89  -3.12   RP11-545J16.1
chr12   21007916        21377807        369.89  -3.12   SLCO1B7
chr12   6625994 6627160 1.17    -5.01   NCAPD2
chr11   64977257        64981527        4.27    -6.72   CAPN1
chr11   64977257        64981527        4.27    -6.72   CAPN1


I need an output:
Code:
chr12   21007916        21377807        369.89  -3.12    RP11-125O5.2,SLCO1B1,SLCO1B7
chr12   6625994 6627160 1.17    -5.01   NCAPD2
chr11   64977257        64981527        4.27    -6.72   CAPN1

I have made a script but need to convert the column 5 into int in order to make it working

Last edited by bartus11; 01-06-2014 at 01:11 PM.. Reason: Please use CODE tags instead of ICODE, for multiline output.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to convert a string to int

Hi, i want to read a text file whose content(single line) will be a number like 1 or 2 or 3 ..... what i want to do is to read the file and increment the content of the file, using unix scripting. Regards, Senthil Kumar Siddhan. (2 Replies)
Discussion started by: senthilk615
2 Replies

2. Programming

to convert int to hex

Hi, Can you help me in converting int value to hex in a single command. Thanks (8 Replies)
Discussion started by: naan
8 Replies

3. Solaris

Convert DWORD to int on solaris for 64-bit

i am converting application from 32-bit to 64-bit on Solaris. How can I convert "DWORD" on Solaris 64-bit to int. Thanks. (1 Reply)
Discussion started by: amit_27
1 Replies

4. Shell Programming and Scripting

Compare string output to int value?

Hi, i'd like to implmeent emergency shutdown script in case our AC dies and the temperature rises too high. I can get core temperatures with: sensors | grep Core | cut -c15-16 Result is: 23 18 18 13 21 18 15 17 How can I check if any of the cores is above eg. 80 (that's C of... (2 Replies)
Discussion started by: zapp0
2 Replies

5. Shell Programming and Scripting

From string to int ?

hello guys i m new to shell scripting and can't find out why this structure is not right I m guessing this happens because $LINESUM is a string . so how can i do this ? i want my script to do so many loops as the number of the lines of one custom file. #!/bin/bash echo give me path name... (5 Replies)
Discussion started by: xamxam
5 Replies

6. Programming

Handle int listen(int sockfd, int backlog) in TCP

Hi, from the manual listen(2): listen for connections on socket - Linux man page It has a parameter called backlog and it limits the maximum length of queue of pending list. If I set backlog to 128, is it means no more than 128 packets can be handled by server? If I have three... (3 Replies)
Discussion started by: sehang
3 Replies

7. Programming

How to pass int and return string in C?

hi I want to write a function which takes int as input and returns a string like this. char GetString(int iNo) { switch(iNo) { case 0: return "Zero"; break; case 1: return "One"; break; } } void main() { int i; printf("Enter... (1 Reply)
Discussion started by: atharalikhan
1 Replies

8. Shell Programming and Scripting

Bash shell script: Str(007) to int(7),increment it(8) & convert back to string(008)

Hi, I have the following requirement. There will be following text/line in a file (eg: search-build.txt) PRODUCT_VERSION="V:01.002.007.Build1234" I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies

9. Programming

IPv4 string->int

Does anyone know how to convert a IP address given as 'string' into a 'u_int32_t'? Are there any build any functions already? (1 Reply)
Discussion started by: Freaky123
1 Replies

10. Programming

Splitting string and storing in int

I have a string containing 2 integers separated by /, for example 12/8 or 8/6 am want to store the numbers in two integers. (3 Replies)
Discussion started by: kristinu
3 Replies
Mail::Message::Convert::HtmlFormatText(3pm)		User Contributed Perl Documentation	       Mail::Message::Convert::HtmlFormatText(3pm)

NAME
Mail::Message::Convert::HtmlFormatText - Convert HTML into Text INHERITANCE
Mail::Message::Convert::HtmlFormatText is a Mail::Message::Convert is a Mail::Reporter SYNOPSIS
use Mail::Message::Convert::HtmlFormatText; my $af = Mail::Message::Convert::HtmlFormatText->new; my $plain_body = $af->format($body); DESCRIPTION
Convert HTML/XHTML message body objects into plain text bodies using HTML::FormatText. This package requires HTML::TreeBuilder and HTML::FormatText which are not installed by default together with Mail::Box. See also Mail::Message::rebuild() with rule "text_alternative_for_html". Converters between message objects Other converters METHODS
Constructors Mail::Message::Convert::HtmlFormatText->new(OPTIONS) -Option --Defined in --Default fields Mail::Message::Convert <see description> leftmargin 3 log Mail::Reporter 'WARNINGS' rightmargin 72 trace Mail::Reporter 'WARNINGS' fields => NAMES|ARRAY-OF-NAMES|REGEXS leftmargin => INTEGER The column of the left margin, passed to the formatter. log => LEVEL rightmargin => INTEGER The column of the right margin, passed to the formatter. trace => LEVEL Converting $obj->format(BODY) Pass an html/xhtml encoded body, and a plain text body is returned. Characters are translated into Latin1. $obj->selectedFields(HEAD) See "Converting" in Mail::Message::Convert Error handling $obj->AUTOLOAD() See "Error handling" in Mail::Reporter $obj->addReport(OBJECT) See "Error handling" in Mail::Reporter $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK]) Mail::Message::Convert::HtmlFormatText->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK]) See "Error handling" in Mail::Reporter $obj->errors() See "Error handling" in Mail::Reporter $obj->log([LEVEL [,STRINGS]]) Mail::Message::Convert::HtmlFormatText->log([LEVEL [,STRINGS]]) See "Error handling" in Mail::Reporter $obj->logPriority(LEVEL) Mail::Message::Convert::HtmlFormatText->logPriority(LEVEL) See "Error handling" in Mail::Reporter $obj->logSettings() See "Error handling" in Mail::Reporter $obj->notImplemented() See "Error handling" in Mail::Reporter $obj->report([LEVEL]) See "Error handling" in Mail::Reporter $obj->reportAll([LEVEL]) See "Error handling" in Mail::Reporter $obj->trace([LEVEL]) See "Error handling" in Mail::Reporter $obj->warnings() See "Error handling" in Mail::Reporter Cleanup $obj->DESTROY() See "Cleanup" in Mail::Reporter $obj->inGlobalDestruction() See "Cleanup" in Mail::Reporter DIAGNOSTICS
Error: Package $package does not implement $method. Fatal error: the specific package (or one of its superclasses) does not implement this method where it should. This message means that some other related classes do implement this method however the class at hand does not. Probably you should investigate this and probably inform the author of the package. SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/ LICENSE
Copyrights 2001-2012 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2012-05-07 Mail::Message::Convert::HtmlFormatText(3pm)
All times are GMT -4. The time now is 12:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy