General :: Parsing Text And Combining The Parsed Text?

Oct 28, 2010

EDIT1: I should note that I was trying to do this in PERL, not sure if other alternatives are more simple?EDIT2: I should note that for text file 3 (reference), it's a long list of MANY cnp_id values and their corresponoding chr, start, and end values. So, the code will have to take the cnp_id from text file 1 and/or 2 and search through textfile 3 (reference) to match on the cnp_id and then take the corresponding chr, start, and end values and add to the relevant line in the output.EDIT3: Sorry, I should mention that the text file entries are all tab-delimited.I have 3 text files:File 1:Columns represent sample IDs (sample_id) and rows represent CNP IDs (cnp_id). Cells represents the confidence level (confidence) for each sample and CNP.Quote:

cnp_idP5E6_SNP6.0_JHP5_010408.CELP5E11reh_SNP6.0_JHP5_011808.CELP7C7_SNP6.0_JHP7_021208.CEL ... etc.
CNP100.0044798340.0027929510.00305613

[code]...

View 6 Replies


ADVERTISEMENT

Software :: Parsing A Text File To Display Certain Data On Website In Php?

Dec 26, 2009

Im trying to figure out how to display parts of a .db file created by the scorch2000 server to display a player name, games played, score and maybe more...

here is the text file format example:

playername1 password email #ofgames score setting1 setting2 setting3
playername2 password email #ofgames score setting1 setting2 setting3
playername3 password email #ofgames score setting1 setting2 setting3
playername4 password email #ofgames score setting1 setting2 setting3
playername5 password email #ofgames score setting1 setting2 setting3

I dont want to display everything, of course ^^, but how do i get the player name, the number of games he played and his score to display it in a webpage in this fasion:

Name Games Played Score

joe blow1 25 9876890
joe blow2 31 8989767
joe blow2 26 7989767
joe blow2 17 5989767
joe blow2 13 4989767

and by highest score because the log doesin't put them in in score order....

please help, i asked the maker because he has one runing already but no answer back, well the game is pretty old so i didn't really expect an answer anyways and tryed to figure it out but i dont know functions in php, this is to include in a php-nuke block (this i know how to do

here is an example of a working page at the developper website:url

View 14 Replies View Related

Programming :: Bash Scripting - Parsing Text File By Character

Aug 11, 2009

Is there a way to process individual characters one-by-one from a text file in Bash, or is that hoping for a little too much from this lovable old clunker?

View 13 Replies View Related

Programming :: Parsing Text Files In Bash / Cant Seem To Read The Array Back?

May 29, 2011

PI'm trying to write a script to list all open ports in the MINIUNPND chain in iptables and use the procotol, port and destination ip to open ports on another router using upnpc.Here is the output of iptables -L MINIUPNPD

Code:
>iptables -L MINIUPNPD
Chain MINIUPNPD (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere 192.168.3.124 tcp dpt:19955
ACCEPT tcp -- anywhere 192.168.3.124 tcp dpt:20054
ACCEPT tcp -- anywhere 192.168.3.130 udp dpt:10654
ACCEPT tcp -- anywhere 192.168.3.121 tcp dpt:29955
code....

No matter what i do i cant seem to remove the first 4 characters from the MYPROT array to leave only the digits. Also i cant seem to read the array back???

I thought it would simply be a loop reading each line and passing the fields in variables, executing upnpc commands i need then moving to the next line of the file until it reached the EOF.

View 12 Replies View Related

General :: Loop Append Text To Text Files?

Jan 15, 2010

may be an advanced question but I need to know how to do this. Here at work I am in charge of recruiting and we have about 1,000 resumes in already. All of the resumes are in a .pdf format. I need to rename every .pdf in the following format:{firstnameLastname}.pdfThe only way I know how to do this is to convert all the .pdf files to text, extract the name out of the first few lines of text, import into excel, and then use VBA to rename the files in mass:Here is my logic so far:~Deskop/a = houses all the .pdfresumesOpen terminal: Code: cd ~/Desktop/afor f in *.pdf; do pdftotext -raw $f; done That will convert all of the preceding resumes into text filesNow I would like to append the name of the text file into the last line of the text file. So, for example, for Resume1.txt, I want to append "Resume1.txt" to the last line within Resume1.txt. So after I run the command I open Resume1.txt and on the last line within I want to see "Resume1.txt" on the last line, at the end of the resume.How can I do this? I would like to use a loop and have the terminal append the filename to the body of the text file until all of the have been appended.

View 1 Replies View Related

General :: All Text In Text Editor Turned To Boxes?

Jul 17, 2009

I was trying to install GTK+-2.8.20, so I installed it's necessary dependencies in this order:

pkg-config-0.23
glib-2.20.4
pango-1.24.4
jpeg library
tiff library
cairo

And I was about to install the last dependency: ATK (Accessability Toolkit).I opened the Archive Manager to extract the "atk-1.26.0.tar.gz" file (yes, I'm still switching from Windows so I'm fond of GUI), but I noticed all the text in that window was boxes, like the □ type box for every letter of text.So instead I thought it wouldn't be a big deal, because the terminal and regular windows weren't screwed up.I opened a text file in gedit (reference to commands in terminal, such as how to extract files via terminal), but yet again all of the text was □-like boxes.

View 2 Replies View Related

General :: Search Text In All Text Files Of All The Sub-directories?

Apr 21, 2010

Currently, when I'm searching text in files of my PHP project, I use this line :

Code:

grep -r 'myTextToFind' *

But now, I would like to search only in ".lang" files. How can I do that ?

View 7 Replies View Related

Fedora :: F14 Gnome Text/plain Versus Text/html File Type

Apr 2, 2011

I put a text file on my desktop and added a couple lines of text with gedit. File type shows text/plain. Double-click opens the file in gedit which is what I want. I'm using the file to temporarily hold some snips of code that I copy from file to file, but when I copy some html into the file and save it, now file properties show it's text/html and a double-click opens the file in firefox, which isn't what I want. Is there some way to keep the file type from changing itself?

View 6 Replies View Related

Fedora :: Copy Text From An Application In The Host Machine And Paste The Text Into A Different App?

Feb 10, 2011

I'm running and XP virtual machine using KVM / QEMU. THere are time when I need to copy text from an application in the Fedora host machine and paste the text into a different app in the XP guest machine. I was able to do this using Vitualbox on an earlier version of Fedora.

View 1 Replies View Related

Programming :: Bash Text To Variable Accessing Individual Text Lines?

May 2, 2010

i am on processing text tasks And i found that if you assign a text to a variable is chomp'ed automatically the newline

Code:

variable=$(cat file.txt)

The problem is i can only access the items/lines using:

Code:

for line in $variable
do
echo $line
# Other commands
done

how do i convert this to an indexed array. More importantly, how do i get access to individual $line[0], ..., $line[n] Another thing, if the file.txt, has lines with spaces it is a mess using the for...in..., but echoing prints line by line...o_0

View 11 Replies View Related

Software :: Use Sed To Include A Text File In The Beginning Of Other Text Files Inside A Folder And Its Subfolders?

Jun 1, 2010

Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.

View 4 Replies View Related

Ubuntu :: Text Editor To Preserve Indentations On Wrapped Text?

Mar 21, 2010

I'm looking for a light-weight text editor for general-purpose composition that can preserve indentations on wrapped lines.

View 3 Replies View Related

Ubuntu :: Text Editor That Will Let Color Or Highlight Text On Demand?

May 11, 2010

Is there a simple text editor for Linux that will let you color or highlight text on demand? Something like gedit or leafpad with color? I know I can probably do this with vi or emacs, but I'm looking for something simple, need not be feature rich.

View 4 Replies View Related

Programming :: Adding Lines Of Text To Beginning Of Text File

Jan 19, 2009

I need to insert 3-4 lines of text to the beginning of a text file. The file is a largish MYSQL dump, the result of a backup shell script. This shell script should insert the required text.I've wrestled with sed, but lost.

View 2 Replies View Related

Programming :: Delete Line Of Text From Text File Via Shell?

Jan 13, 2010

I have to delete a certain line of text from the a textfile via ubuntu's shell scripting.I have done research, and it seems that most people advocate the usage of sed /d option. sed makes does not edit the text file. Hence, most options I discovered involved the use of a temporary variable/textfile and then overwriting the old file with the temporary new file. Is there anyway whereby I can bypass the use of temporary storage containers? I hope there is any magical combination of commands to edit the file directly.

View 3 Replies View Related

Programming :: Exporting Glade Text View To Text File?

Jan 8, 2011

I want to display something in my text view widget in glade using c code. that's all right.
now I need to attach a save button beneath the text view.so that on click the text view content should save as a txt file..

View 8 Replies View Related

Programming :: Formatting Fields And Text Being Displayed From Text File?

Feb 9, 2011

I want to display the contents of a particular log file (simple text file, I mean in Linux). But there is a problem: The contents need to be organized in a fixed format. Have a look at this log file:

sampleLog.txt

Code:

User Name: XYZ
Reported Problems Description: Blah! Blah! Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah!

[code]....

So, while displaying the contents of above file on a web page, I want to format the field names found in the log file: User Name:, Reported Problems Description:, and Remarks:. These fields may contain a variable length of text and no specific line number is assumed for them to appear on.

The desired output should look like this:

User Name: XYZ
Reported Problems Description: Blah! Blah! Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah!

[code]....

Well, what I am trying to do may sound wierd to some of you. The filed "Reported Problems Description:" can possible contain text which embeds colon (.

View 15 Replies View Related

CentOS 5 :: Text User Interface To Configure Text Files

Nov 5, 2009

I would like to write a text user interface (TUI) to adjust some text config files etc. Is there a tool or application for creating TUIs like this. I�m talking about those types of config tools which you see executed at first boot.

View 19 Replies View Related

OpenSUSE :: Copy - Paste - KMail - Not Only The Marked Text Will Be Pasted But A Kind Of HTML Code Including The Text

Jan 10, 2011

since some days I have a strange problem with KMail (1.13.5) in KDE4.5.5. When I try to copy some text from an email and past it to any other program (e.g. Openoffice), not only the marked text will be pasted, but a kind of HTML code including the text.

This bug is not OpenSuse specific. I found the same bug in a Fedora mailing list (of course, whithout an answer): Strange Copy/Paste behavior in KMail 1.13.5/Kontact 4.4.8

View 6 Replies View Related

Ubuntu :: GIMP 2.7's New Text Tool Blocks Text?

Jun 17, 2010

The new feature in Gimp 2.7 that attaches basic text formatting options (bold, italicunderline, strike-through) to the active text box is either buggy or just bad design.The text edit buttons are actually being placed on top of the text box (which contains text) instead of off to the side, and that is causing me to not be able to see the text.See screenshot for example:GIMP version: 2.7.1Am I doing something wrong or are others experiencing this too?

View 1 Replies View Related

Ubuntu :: Add / Remove Bits Of Text From A Text File

Dec 6, 2010

I am looking for a way to keep a log and make if then statements if a line exitsts in the log. I also am looking for a way to make a simple loop, like goto line number, and I also am wondering how to add/remove bits of text from a text file (plugins line in server.properties)

View 5 Replies View Related

Programming :: Sed To Output Block Of Text If Specified Text Is Matched?

Feb 13, 2010

I am trying to find sed command combination to print out the "start command" line, the id line and all lines between "details" and "stop command" only if "error" exists. Here's the original output (test.txt):

start command
id 1
kajsdlfjsalj

[code]...

View 3 Replies View Related

Programming :: Add Text Before Line Number In Text File?

May 3, 2010

a sed command to add a text before line number in text file? I have text file with 500 lines, and i want to add 3 more lines with text after line 300, OR before line 302, isn't no problem.

View 16 Replies View Related

Ubuntu :: All Text Is Displaying As Rectangles Instead Of Text?

Sep 8, 2010

I un-installed a few files related to Java yesterday (maybe I removed something else by mistake, I don't think so but I'm having trouble reading log files) and now every piece of text, excluding text rendered by the browser from webpages, is displaying as rectangles.

Trying to start Firefox reports:

Quote:

(firefox-bin:2185): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'
(firefox-bin:2185): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'
Segmentation fault

View 2 Replies View Related

General :: Replace Text In One File With Text From Another File Using Sed?

Apr 28, 2010

How could I replace text in one file with text from another file using sed?

The text in each of the files would be surrounded by a starting and ending delimiter or a starting tag, say like /* */ so to easily find them.

View 8 Replies View Related

General :: Text To Speech / Speech To Text In Linux & C / C++

Jul 11, 2011

I want a tool / library / package in C/C++/Python for basically Text to Speech - Speech to Text in Linux.I've tried pyttsx in python , but it runs only in windows as expected, in Linux (openSUSE 11.2 , the script just hangs up )festival in C. - in Ubuntu - Could not configured it successfully.

View 1 Replies View Related

OpenSUSE Install :: Text Based Splash Screen - Show Text Based Startup On Booting OS?

Aug 11, 2011

I have a question regarding to the Graphical Splash Screen. Is their a way to show the text based startup on booting your OS? So. I don't the OpenSuse Background with the loading line. But i want the half transparent black background if possible or just the black background with all the loading texts. The black and white screen.

View 9 Replies View Related

Ubuntu :: Sort The Output To A Text File So That It Prints To The Text File At 1 Process Per Line?

Feb 6, 2011

im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.

echo $(ps aux) >>out

The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.

View 5 Replies View Related

Software :: Join 2 Text Files Based On First Number Present In Every Line Of The 2 Text Files?

Jan 22, 2010

I have 2 text files : file1.txt and file2.txt

cat file1.txt

15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces

cat file2.txt

2 this is sentence1file2
6 this is sentence2file2
54 this is sentence3file2

I would like to join these 2 files. The result should look as follows :

cat joinedfile.txt

2 this is sentence1file2
6 this is sentence2file2
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
54 this is sentence3file2

==> so the joined file must be sorted on the first number. Any ideas how this can be achieved ?

View 4 Replies View Related

Programming :: Remove Lines In A Text File Based On Another Text File?

Jan 28, 2009

I have a text file called file1.txt containing many lines eg.

line1
line2
line3
line4
line5
line6

Then i have another text file called file2.txt contains

3
5
6

Is there a command to remove the lines in file1.txt based on the keywords in file2.txt? note: It should remove line3,line5,line6 based on 3,5,6

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved