Removing carriage returns from multiple lines in multiple files of different number of columns
Hello Gurus,
I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file.
I am after the output as below
I have tried various options mentioned in the forum but it doesn't seems to be working on records with on multiple lines on mutiple files in a directory
Any help would be appreciated.
Thans
DEV
Last edited by Don Cragun; 06-07-2016 at 10:56 PM..
Reason: Add CODE tags, again.
How do we delete all carriage returns after a particular string using sed inside a K Shell?
e.g. I have a text file named file1 below:
$ more file1
Group#=1 User=A
Role=a1
Group#=2 User=B
Role=a1
Role=b1
Group#=3 User=C
Role=b1
I want the carriage returns to be delete on the... (12 Replies)
Hi Guru's , I have a whole bunch of files in /var/tmp that i need to strip any blank lines from, so ive written the following script to identify the lines (which works perfectly).. but i wanted to know, how can I actually strip the identified lines from the actual source files ??
my... (11 Replies)
Hi,
I have a huge file with a single line.
But I want to break that line into lines of with each line having five columns.
My file is like this:
code:
"hi","there","how","are","you?","It","was","great","working","with","you.","hope","to","work","you."
I want it like this:
code:... (1 Reply)
Hey everyone, I have a question about comparing two files. I have two lists of files. The first list, todo.csv, lists a series of compounds my supervisor wants me to perform calculations on. The second list, done.csv, lists a series of compounds that I have already performed calculations on.... (2 Replies)
I would like to remove carriage returns/line feeds in a text file, but in a specific cadence:
Read first line (Header Line 1), remove cr/lf at the end (replace it with a space ideally);
Read the next line (Line of Text 2), leave the cr/lf intact;
Read the next line, remove the cr/lf;
Read... (14 Replies)
I have a CSV with carriage returns in place of newlines. I am trying to use tr to remove them, but it isn't working.
Academic year,Term,Course name,Period,Last name,Nickname
2012-2013,First Semester,English 12,4th Period,Arnold,Adam
2012-2013,First Semester,English 12,4th Period,Adams,Jim... (1 Reply)
Hello,
I would like to ask for help with csh script.
An example of an input in .txt file is below, the number of lines varies from file to file and I have 2 or 3 columns with values. I would like to read all the values (probably one by one) and set them to independent unique variables that... (7 Replies)
There is a closed thread called "carriage returns within quotation marks causing new lines in csv" that I am unable to post to, so I am starting a new thread.
The awk solution worked perfectly in most cases. We have some cases where there are multiple carriage returns within a single quoted... (9 Replies)
GM,
I have an issue at work, which requires a simple solution. But, after multiple attempts, I have not been able to hit on the code needed.
I am assuming that sed, awk or even perl could do what I need.
I have an application that adds extra blank page feeds, for multiple reports, when... (7 Replies)
Discussion started by: jxfish2
7 Replies
LEARN ABOUT OPENSOLARIS
mlib_imagetestflags
mlib_ImageTestFlags(3MLIB) mediaLib Library Functions mlib_ImageTestFlags(3MLIB)NAME
mlib_ImageTestFlags - test flags
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
int mlib_ImageTestFlags(const mlib_image *img, mlib_s32 flags);
DESCRIPTION
The mlib_ImageTestFlags() function tests the flags for a combination of the following predefined characteristics. Note that the result of
zero means the conditions are satisfied.
MLIB_IMAGE_ALIGNED64 /* data address is 64-byte aligned */
MLIB_IMAGE_ALIGNED8 /* data address is 8-byte aligned */
MLIB_IMAGE_ALIGNED4 /* data address is 4-byte aligned */
MLIB_IMAGE_ALIGNED2 /* data address is 2-byte aligned */
MLIB_IMAGE_WIDTH8X /* width is multiple of 8 */
MLIB_IMAGE_WIDTH4X /* width is multiple of 4 */
MLIB_IMAGE_WIDTH2X /* width is multiple of 2 */
MLIB_IMAGE_HEIGHT8X /* height is multiple of 8 */
MLIB_IMAGE_HEIGHT4X /* height is multiple of 4 */
MLIB_IMAGE_HEIGHT2X /* height is multiple of 2 */
MLIB_IMAGE_STRIDE8X /* stride is multiple of 8 */
MLIB_IMAGE_ONEVECTOR /* stride is equal to width in bytes */
MLIB_IMAGE_USERALLOCATED /* data space has been allocated by user */
MLIB_IMAGE_ATTRIBUTESET /* image attribute flags have been set */
PARAMETERS
The function takes the following arguments:
img Pointer to a mediaLib image structure.
flags Combination of a set of characteristics to be tested. It is formed by logically Oring one or more individual predefined character-
istics.
RETURN VALUES
The function returns an integer value containing results of test. Condition = 0 if satisfied; otherwise, Condition != 0.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_ImageGetFlags(3MLIB), attributes(5)SunOS 5.11 2 Mar 2007 mlib_ImageTestFlags(3MLIB)