Hi,
Below is the format of a report generated by a custom reporting solution. I opened the report in Notepad++ and junked data and values as in the image below.
I want to convert the values to a PIPE delimited format as below
But there are challenges in getting this as the column heading itself is spread across two lines. There are lot of reports like this covering different subjects. I tried writing a program in Python to get this done. But not able to. Is there any way to handle this?
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)
Hello,
I have 2 files say
File 1 has
ABC
DEF
GHI
File 2 has
123
456
789
I need output as
ABC 123
DEF 456
GHI 789
I tried awk and sed but not able to get it in the right way. :confused:
Please help. Thanks (25 Replies)
I've done this before but I can't remember how. Too long away from vi.
I want to do a search are replace, but I want the replace to be a join.
Example
see spot run
see spot walk
see spot run fast
see spot hop
%s/run$/<somehow perform a join with the next line>/g
so the results... (0 Replies)
i have a script that joins 2 lines of a file into one line and again next 2 line into one line.
if number of line is 4 then after joining it should be 2 lines in a file
my file a1.txt has some of the below lines
1-GH32X, CC, AMR,
Number of Intervals Not Inserted: 1 / 95
1-150KP1, CC,... (3 Replies)
Hi ,
I want to join two lines in a file, where the second line contain query string. if it doesn't contain that string i don't want to join
e.g.
Input file is as following:
name fame game
none none none
name fame game
cat eat mice
I need output file as
name fame game
none none... (2 Replies)
Hi All,
I need the command to join 2 lines into one. I found lots of threads but none give me the sollution. Probably because unix scripting is one of my best features ;)
I got a logfile where line 2 needs to be joined with line 1, lines 4 needs to be joined with line 3 etc
If you need... (16 Replies)
Hi Guys,
Was trying to attempt the below using awk and sed, have no luck so far, so any help would be appreciated.
Current Text File: The first line has got an "\n", and the second line has got spaces/tabs then the word and "\n"
TIME SERVER/CLIENT TEXT... (6 Replies)
I have a plain test file with a delimeter ''. In this file some lines are broken into two. The first part of these broken line will have 6 columns and the second part will have 4. These broken lines will be consicutive.
I want to join the two consicutive lines which are having 6 fields and 4... (8 Replies)
Hi all,
I'm excited to the part of unix.com forum, and noob to it.
I have an query, where I have an file and it contains data like this
use
thread
when
posting
do
no
I was expecting the result as
use thread
thread when
when posting
posting do
do no
use thread when
thread when... (6 Replies)
Hi - I have req to join broken lines and remove empty lines but should NOT be in one line. It has to be as is line by line. The challenge here is there is no end of line/start of line char.
thanks in advance
Source:-
2003-04-34024|04-10-2003|Claims|Claim|01-13-2003|Air Bag:Driver;... (7 Replies)
Discussion started by: Jackceasar123
7 Replies
LEARN ABOUT DEBIAN
imgsizer
IMGSIZER(1)IMGSIZER(1)NAME
imgsizer - automatically splice in height and width params for HTML IMG tags
SYNOPSIS
imgsizer [-d file] [--document-root file] [-h file] [--help file] [-n] [--no-overwrite] [HTMLFile] [-v file] [--version]
OPTIONS
Display version information and exit.
Display usage information.
Directory where absolute image filenames (i.e, ones which contain a leading "/") may be found.
-n, --no-overwwrite, .SH DESCRIPTION
The imgsizer script automates away the tedious task of creating and updating the extension HEIGHT and WIDTH parameters in HTML IMG
tags. These parameters help many browsers (including the Netscape/Mozilla family) to multi-thread image loading, instead of having
to load images in strict sequence in order to have each one's dimensions available so the next can be placed. This generally allows
text on the remainder of the page to load much faster.
This script will try create such attributes for any IMG tag that lacks them. It will correct existing HEIGHT and WIDTH tags unless either
contains a percent (%) sign, in which case the existing dimensions are presumed to be relative and left unaltered.
This script may be called with no arguments. In this mode, it filters HTML presented on stdin to HTML (unaltered except for added or cor-
rected HEIGHT and WIDTH attributes) on stdout. If called with file arguments, it will attempt to transform each file in place. Each argu-
ment file is not actually modified until the script completes a successful conversion pass.
The -d <directory> option sets the DocumentRoot, where images with an absolute filename (i.e., ones which contain a leading "/") may be
found. If none is specified, the DocumentRoot defaults to the current working directory.
The -n (no-overwrite) opion prevents the program from overwriting existing width and height tags if both are present.
Additional options may also be specified in the environmental variable "IMGSIZER". For example, to avoid typing "imgsizer -d /var/www/docs"
each time imgsizer is invoked, you might tell sh (or one of its descendants):
IMGSIZER="-d /var/www/docs"; export IMGSIZER
or, if you use csh:
setenv IMGSIZER "-d /var/www/docs"
This script is written in Python, and thus requires a Python interpreter on the host system. It also requires either the identify(1) utili-
ty distributed in the open-source ImageMagick suite of image-display and manipulation tools, or a modern version of file(1) and rdjpg-
com(1). These utilities are used to extract sizes from the images; imgsizer itself has no knowledge of graphics formats. The script will
handle any image format known to identify(1) including PNG, GIF, JPEG, XBM, XPM, PostScript, BMP, TIFF, and anything else even remotely
likely to show up as an inline image.
NOTE
The -q, -l, and -m options of the 1.0 versions are gone. What they used to do has been made unnecessary by smarter logic.
BUGS
The code uses regular expressions rather than true HTML/XML parsing. Some perverse but legal constructions, like extraneous space within
quoted numeric attributes, will be mangled.
AUTHOR
Originally created by Eric S. Raymond <esr@thyrsus.com>. Additional code contributed by Erik Rossen, Michael C. Toren <michael@toren.net>,
and others. For updates, see <http://www.catb.org/~esr: http://www.catb.org/~esr>
SEE ALSO identify(1), file(1), rdjpgcom(1).
IMGSIZER(1)