Sponsored Content
Full Discussion: Broken line issue
Top Forums UNIX for Dummies Questions & Answers Broken line issue Post 302905920 by Scrutinizer on Monday 16th of June 2014 05:51:58 AM
Old 06-16-2014
In addition to that: ORS=NF<4?FS:RS means, if the number of fields is less than 4 set the output record separator (ORS) to the field seperator (FS, ~ in this case), otherwise to the input record separator (RS, a newline by default)
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

end of line issue

Hello, I am getting few text files with no EOF ( or end-of-line ) which i need to fix using a command so that i can include it in a script. Now i'm fixing this issue by opening the file in "vi" editor and adding last line. e.g., server1#wc -l temp.txt 9 temp.txt server1#cat ... (6 Replies)
Discussion started by: prvnrk
6 Replies

2. Shell Programming and Scripting

Issue in reading file line by line

I have a file something like: a &nbsp&nbsp&nbsp b c &nbsp&nbsp d sdfsdf &nbsp&nbsp f f &nbsp f f &nbsp fffff dfdf Now when i read it as while read line do echo $line done< file I get the o/p as a b c d sdfsdf f f f f fffff dfdf (5 Replies)
Discussion started by: Shivdatta
5 Replies

3. Shell Programming and Scripting

paste broken pieces of a record into one line

I am working with a file that has some of the records broken into several lines, I need paste the pieces back into one line. All records should start with numeric id, and presently all lines do start with id. The last field of the record is "telephone", so I need to make sure that each line starts... (1 Reply)
Discussion started by: migurus
1 Replies

4. Shell Programming and Scripting

New line characted issue

Hi Inorder to eliminate new line characters and the empty lines from our data and I used the below syntax : awk '/^/{print ""};{gsub("\"\"", "");printf"%s", $0};END{print ""}' | sed '/^$/d' and eliminated all the new line char and the empty lines in my data. But except the below sample... (10 Replies)
Discussion started by: rbmuruga
10 Replies

5. Shell Programming and Scripting

while read LINE issue

Hi, This is the script and the error I am receiving Can anyone please suggest ? For the exmaple below assume we are using vg01 #!/bin/ksh echo "##### Max Mount Count Fixer #####" echo "Please insert Volume Group name to check" read VG lvs |grep $VG | awk {'print $1'} > /tmp/audit.log ... (2 Replies)
Discussion started by: galuzan
2 Replies

6. Shell Programming and Scripting

awk new line issue, saying string can't contain new line character

Hi , I am doing some enhancements in an existing shell script. There it used the awk command in a function as below : float_expr() { IFS=" " command eval 'awk " BEGIN { result = $* print result exit(result == 0) }"' } It calls the function float_expr to evaluate two values ,... (1 Reply)
Discussion started by: mady135
1 Replies

7. Shell Programming and Scripting

[BASH] read 'line' issue with leading tabs and virtual line breaks

Heyas I'm trying to read/display a file its content and put borders around it (tui-cat / tui-cat -t(ypwriter). The typewriter-part is a 'bonus' but still has its own flaws, but thats for later. So in some way, i'm trying to rewrite cat using bash and other commands. But sadly it fails on... (2 Replies)
Discussion started by: sea
2 Replies

8. UNIX for Beginners Questions & Answers

Performance issue to read line by line

Hi All- we have performance issue in unix to read line by line. I am looking at processing all the records. description: Our script will read data from a flat file, it will pickup first four character and based on the value it will set up variables accordingly and appended the final output to... (11 Replies)
Discussion started by: balu1729
11 Replies

9. Shell Programming and Scripting

Performance issue - to read line by line

All- We have a performance issue in reading a file line by line. Please find attached scripts for the same. Currently it is taking some 45 min to parse "512444" lines. Could you please have a look at it and provide any suggestions to improve the performance. Thanks, Balu ... (12 Replies)
Discussion started by: balu1729
12 Replies

10. UNIX for Beginners Questions & Answers

Reading File line by line - Issue

I am trying to read the below file line by line for the below operation i) extract the directory alone and assign it one variable ii) extract the permission available in the line and add comma between the permissions and assign to another variable iii) Finally apply setfacl logic as shown in... (3 Replies)
Discussion started by: sarathy_a35
3 Replies
mlib_ImageAdd(3MLIB)					    mediaLib Library Functions					      mlib_ImageAdd(3MLIB)

NAME
mlib_ImageAdd - computes the addition of two images on a pixel-by-pixel basis SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageAdd(mlib_image dst, const mlib_image *src1, const mlib_image *src2); DESCRIPTION
The mlib_ImageAdd() function computes the addition of two images on a pixel-by-pixel basis. It uses the following equation: dst[x][y][i] = src1[x][y][i] + src2[x][y][i] PARAMETERS
The function takes the following arguments: dst Pointer to destination image. src1 Pointer to first source image. src2 Pointer to second source image. RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_ImageAdd_Fp(3MLIB), mlib_ImageAdd_Fp_Inp(3MLIB), mlib_ImageAdd_Inp(3MLIB), attributes(5) SunOS 5.11 2 Mar 2007 mlib_ImageAdd(3MLIB)
All times are GMT -4. The time now is 04:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy