Sponsored Content
Full Discussion: file separator issue
Top Forums Shell Programming and Scripting file separator issue Post 302581752 by jojo123 on Wednesday 14th of December 2011 02:40:43 AM
Old 12-14-2011
Question file separator issue

Dear All,

this is very quick question from all the user need your real help.

I have a file in a format like

HTML Code:
############################### 20111213-01:00:00 #####################################################
|1002|0.7|3.9421424319336|/opt/bea/j2sdk1.4.
|8241|0.5|0.43139228816|esd
|12523|0.4|0.29011217384|/opt/OV/lbin/perf/
|6965|0.3|0.915135267504|/opt/bea/jdk142_08
|3|0.3|0.0|27
|9923|0.2|11.1918304907200|ora_s000_SunMC
|9933|0.1|11.0915240902936|ora_d000_SunMC
|9898|0.1|11.1916504904184|ora_ckpt_SunMC
|7641|0.1|0.514260841912|/opt/bea/j2sdk1.4.
|7036|0.1|0.1|15
############################### 20111213-01:01:00 #####################################################
|14845|1.6|1.243626495496|-server
|1002|1.2|3.9421424319336|/opt/bea/j2sdk1.4.
|8241|0.6|0.43139228816|esd
|6965|0.5|0.915135267512|/opt/bea/jdk142_08
|3|0.2|0.0|27
|12523|0.2|0.29011217384|/opt/OV/lbin/perf/
|7641|0.1|0.514260841912|/opt/bea/j2sdk1.4.
|6964|0.1|0.513111241368|/opt/bea/jdk142_08
|6928|0.1|0.411630426632|/opt/bea/jdk142_08
|3967|0.1|0.713868055240|/usr/j2se/bin/java
now between each HASH i want to get the first line in format like

20111213-01:00:00|1002|0.7|3.9421424319336|/opt/bea/j2sdk1.4.
20111213-01:01:00|14845|1.6|1.243626495496|-server

The parsed fiel is genrated as per my script but Now i need more formated data for Graph plotting whose purpose is to get the Highest CPU utilization of a process in an interval of one minute.Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File column separator

Hi I have one file named pd.txt containing 0009910006101000001UNR OXYMETAZOLINE SPRAY 15ML 0831-30 OXYMETAZOLINE HCL PCK UNDEFINED NA 11420027305UNRURL PHARMA URL PHARMA NOSQC-SPRAY 0000--000000015000000001---1984-12-01ETH N006770831300999992 10006101023340000{0903032 X ... (5 Replies)
Discussion started by: mnmonu
5 Replies

2. Programming

Missing Separator Issue in Make file

Hi All, I am using Make to compile my java code. I am pasting the portion which is creating an issue. install: $(FPR_FILES) if test $OS = "Linux"; then @echo "TEST" -$(INS) -d -m 775 $(INSDIR)/linux/deployment cp -R $(ROOT)/deployment $(INSDIR)/linux/deployment ... (3 Replies)
Discussion started by: ngopalakrishna
3 Replies

3. Shell Programming and Scripting

Help in formating a file with field separator

hi thanks a lot But pls help me if my input file is the below format: Name priya 2010-09-21 10:43:49 TEXT ID 1 hi TEXT ID 2 how TEXT ID 3 r TEXT ID 4 u Name2 priya2 2010-09-21 10:43:49 TEXT ID 1 hi1 TEXT ID 2 how1 TEXT ID 3 r1 (4 Replies)
Discussion started by: bha148
4 Replies

4. Shell Programming and Scripting

embed a separator after each word in a text file

Folks, can anyone throw a code snippet here to insert a comma " , " after each word in a line when doing a file read and output the delimited text to a file. Appreciate your help Venu (9 Replies)
Discussion started by: venu
9 Replies

5. Shell Programming and Scripting

Rename a file based on a specific separator

Hello, I am new to shell I have a folder which contains a list of files, all the files contain the separator : I need to replace this character for all the filenames (by batch) ex: hello:world should become hello-world please help Thanks (3 Replies)
Discussion started by: sikilaklak
3 Replies

6. Shell Programming and Scripting

How to reverse all columns of a file having some field separator?

Hello, I have a file: xandyandz x & y & z x*y*z*a I require output as: zandyandx z & y & x a*z*y*x here all lines have different field seperator (and & * )based on that i want to reverse the column of a file. Pl. help. (8 Replies)
Discussion started by: nehashine
8 Replies

7. Shell Programming and Scripting

Grep or print each section of a file on one line with a separator

I can obtain information from itdt inventory command however it display as below, I'd like to print each entity on one line but seperated by : the file is something like and each section ends with Volume Tag Drive Address 256 Drive State ................... Normal ASC/ASCQ... (3 Replies)
Discussion started by: gefa
3 Replies

8. Shell Programming and Scripting

Putting a separator in file using awk/bash

I have a file with the following content: a-123-345-232 a-23343-4545-545 a-67676-45454-8787 a-129-8912-9824 b-564-78678-2322 b-5454-76767-8899 b-85554-124-152-29 c-34534-654543-323 (... and so on, actually these are pretty huge records) Now, I want that the file should not be broken in to... (8 Replies)
Discussion started by: askerbis
8 Replies

9. Shell Programming and Scripting

CSV file column separator

Hi, I have a CSV file of 40 columns with "," as delimiter. I want to assign the value of each column to a variable. But some of the columns content inside contains "," so how can i split the columns and assign it to a variable. Regards, ARASU. (1 Reply)
Discussion started by: Arasu123
1 Replies

10. UNIX for Advanced & Expert Users

File command return wrong filetype while file holds group separator char.

hi, I am trying to get the FileType using the File command. I have one file, which holds Group separator along with ASCII character. It's a Text file. But when I ran the File command the FileType is coming as "data". It should be "ASCII, Text file". Is the latest version of File... (6 Replies)
Discussion started by: Arpitak29
6 Replies
TIDY.GETOPTDOC(3)							 1							 TIDY.GETOPTDOC(3)

tidy::getOptDoc - Returns the documentation for the given option name

       Object oriented style

SYNOPSIS
string tidy::getOptDoc (string $optname) DESCRIPTION
Procedural style string tidy_get_opt_doc (tidy $object, string $optname) tidy_get_opt_doc(3) returns the documentation for the given option name. Note You need at least libtidy from 25 April, 2005 for this function be available. PARAMETERS
o $object - The Tidy object. o $optname - The option name RETURN VALUES
Returns a string if the option exists and has documentation available, or FALSE otherwise. EXAMPLES
Example #1 Print all options along with their documentation and default value <?php $tidy = new tidy; $config = $tidy->getConfig(); ksort($config); foreach ($config as $opt => $val) { if (!$doc = $tidy->getOptDoc($opt)) $doc = 'no documentation available!'; $val = ($tidy->getOpt($opt) === true) ? 'true' : $val; $val = ($tidy->getOpt($opt) === false) ? 'false' : $val; echo "<p><b>$opt</b> (default: '$val')<br />". "$doc</p><hr /> "; } ?> SEE ALSO
tidy.getconfig(3), tidy.getopt(3). PHP Documentation Group TIDY.GETOPTDOC(3)
All times are GMT -4. The time now is 03:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy