After having some issues around spaces and format I decided to try a basic approach, so I wrote an easy to read script. It may not be the most optimal but it does the job and is easy to maintain.
So, the code joins lines into one (so that they all start with R| ). Then performs some sentiment analysis on the line and appens |positive |negative or |neutral at the end
Hi,
I need to develop a script to join multiple three lines in a log file into one line for processing with awk and grep. I looked at tr with no success. The first line contains the date time information. The second line contains the error line. The third line is a blank line.
Thanks,
Mike (3 Replies)
Hi guys,
I've got a log file which has entries that look like this:
-------------------------------------------------------------------------------
06/08/04 07:57:57
AMQ9002: Channel program started.
EXPLANATION:
Channel program 'INSCCPQ1.HSMTSPQ1' started.
ACTION:
None. ... (3 Replies)
sir... am having a data file of customer master., containing some important fields as a set one line after another.,
what i want is to have one set of these fields(rows) one after another in line.........then the second set... and so on... till the last set completed.
... (0 Replies)
sir... am having a data file of customer master., containing some important fields as a set one line after another.,
what i want is to have one set of these fields(rows) one after another in line.........then the second set... and so on... till the last set completed.
I WANT THE DATA... (0 Replies)
Hi All
I'm struggling a bit here :(
I need a way of joining lines contained in a text file. I've seen numerous SED and AWK examples and none of them seem to be working for me.
The text file has 4 lines:
DELL1427
DOC
30189342
79
Now bear with me on this one as I'm actually... (4 Replies)
I’m writing a bash shell script and I want to join lines together where two variables on each line are the same ie.
12345variablestuff43212morevariablestuff
12345variablestuff43212morevariablestuff
34657variablestuff78945morevariablestuff
34657variablestuff78945morevariablestuff... (12 Replies)
Hi,
I have a file like mentioned below..For each specific id starting with > I want to join the sequence in multiple lines to a single line..Is there a simple way in awk or sed to do this
>ENST00000558922 cdna:KNOWN
TCCAGGATCCAGCCTCCCGATCACCGCGCTAGTCCTCGCCCTGCCTGGGCTTCCCCAGAG... (2 Replies)
Hi,
I have a pipe delimeted text file where lines have been split over 2 lines and I need to join them back together. For example the file I have is similar to the following:
aaa|bbb
|ccc
ddd|eee
fff|ggg
|hhh
I ideally need to have it looking like the following
aaa|bbb|ccc
ddd|eee... (5 Replies)
Hi,
I have a file containing many records delimited by pipe (|).
Each record should contain 17 columnns/fields. there are some fields having fields less than 17.So i am extracting those records to a file using the below command
awk 'BEGIN {FS="|"} NF !=17 {print}' feedfile.txt... (8 Replies)
Hi to everybody.
I have a "2n" lines file. I would like to create a
new file with only "n" lines, each line in the new
file formed by the proper odd line of the old file
joined with the following even line (separated by
a space) of the old file. I'd prefer using sed or
bash.
-example-... (5 Replies)
Discussion started by: felino
5 Replies
LEARN ABOUT CENTOS
zzip_disk_fread
ZZIP_DISK_FOPEN(3) zziplib Function List ZZIP_DISK_FOPEN(3)NAME
zzip_disk_fopen, zzip_disk_entry_fopen, zzip_disk_fread, zzip_disk_fclose, zzip_disk_feof - openening a file part wrapped within a
(mmapped) zip archive
SYNOPSIS
#include <zzip/mmapped.h>
zzip__new__ ZZIP_DISK_FILE * zzip_disk_fopen((ZZIP_DISK * disk, char *filename));
zzip__new__ ZZIP_DISK_FILE * zzip_disk_entry_fopen((ZZIP_DISK * disk, ZZIP_DISK_ENTRY * entry));
zzip_size_t zzip_disk_fread((void *ptr, zzip_size_t sized, zzip_size_t nmemb, ZZIP_DISK_FILE * file));
int zzip_disk_fclose((ZZIP_DISK_FILE * file));
int zzip_disk_feof((ZZIP_DISK_FILE * file));
DESCRIPTION
The zzip_disk_fopen function opens a file found by name, so it does a search into the zip central directory with zzip_disk_findfile and
whatever is found first is given to zzip_disk_entry_fopen
the ZZIP_DISK_FILE* is rather simple in just encapsulating the arguments given to the zzip_disk_entry_fopen function plus a zlib deflate
buffer. Note that the ZZIP_DISK pointer does already contain the full mmapped file area of a zip disk, so open()ing a file part within that
area happens to be a lookup of its bounds and encoding. That information is memorized on the ZZIP_DISK_FILE so that subsequent _read()
operations will be able to get the next data portion or return an eof condition for that file part wrapped in the zip archive.
The zzip_disk_fread function reads more bytes into the output buffer specified as arguments. The return value is null on eof or error, the
stdio-like interface can not distinguish between these so you need to check with zzip_disk_feof for the difference.
The zzip_disk_fclose function releases any zlib decoder info needed for decompression and dumps the ZZIP_DISK_FILE* then.
The zzip_disk_feof function allows to distinguish an error from an eof condition. Actually, if we found an error but we did already reach
eof then we just keep on saying that it was an eof, so the app can just continue.
AUTHOR
o Guido Draheim <guidod@gmx.de>
COPYRIGHT
Copyright (c) 2003,2004,2006 Guido Draheim All rights reserved, use under the restrictions of the Lesser GNU General Public License or
alternatively the restrictions of the Mozilla Public License 1.1
zziplib 0.13.62 ZZIP_DISK_FOPEN(3)