Sponsored Content
Top Forums Shell Programming and Scripting How to replace multiple "&nbsp;" entry with in <td> tag into single entry using sed? Post 302989200 by Don Cragun on Monday 9th of January 2017 06:23:41 PM
Old 01-09-2017
You could also try the following, which, other than copying the 1st line of your sample input file unchanged to the output, seems to create the output you said you want (and I don't understand from your description why the 1st line should not be copied unchanged):
Code:
sed ':x
s/&nbsp; &nbsp;/\&nbsp;/g
tx' 12.txt

This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies

2. UNIX for Advanced & Expert Users

how to delete entry in file "wtmpx"(/var/adm/wtmpx)

Do someone know how to delete entry(some lines) in file "wtmpx" that command "last" use it. this file is binary so I cannot edit directy. ========================= #last root pts/1 noc Fri Mar 3 22:04 still logged in root pts/1 noc Fri Mar 3 22:01 - 22:02 ... (4 Replies)
Discussion started by: arm_naja
4 Replies

3. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

4. Solaris

VI Editor issue "E558: Terminal entry not found in terminfo"

When trying to open a document with VI editor, getting the following error.. E558: Terminal entry not found in terminfo 'vt100' not known. Available builtin terminals are: builtin_gui builtin_riscos builtin_amiga builtin_beos-ansi builtin_ansi builtin_pcansi ... (8 Replies)
Discussion started by: vikram3.r
8 Replies

5. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

Replace dashes positions 351-357 & 024-043 with 0 & replace " " if exis with 04 at position 381-382

I need to replace dashes (i.e. -) if present from positions 351-357 with zero (i.e. 0), I also need to replace dash (i.e “-“) if present between position 024-043 with zero (i.e. 0) & I replace " " (i.e. 2 space characters) if present at position 381-382 with "04". Total length of record is 413.... (11 Replies)
Discussion started by: lancesunny
11 Replies

8. Shell Programming and Scripting

awk Help: Filter Multiple Entry & print in one line.

AWK Gurus, data: srvhcm01 AZSCI srvhcm01 AZSDB srvhcm01 BZSDB srvhcm01 E2QDI31 srvhcm01 YPDCI srvhcm01 YPDDB srvhcm01 UV2FSCR srvhcm01 UV2FSBI srvhcm01 UV2FSXI srvhcm01 UV2FSUC srvhcm01 UV2FSEP srvhcm01 UV2FSRE srvhcm01 NASCI srvhcm01 NASDB srvhcm01 UV2FSSL srvhcm01 UV2FSDI (7 Replies)
Discussion started by: rveri
7 Replies

9. UNIX for Beginners Questions & Answers

ERROR: ldapmodify: wrong attributeType at line 6, entry "olcDatabase={0}hdb,cn=config"

please use code tags, thanks Initially olcDatabase={2}config.ldif file was in non-prod and it does not have any entries of database and password as well that is why I was getting error as “ldap_bind: Invalid credentials (49)”¯ , I was comparing with my production olcDatabase={2}config.ldif file ... (1 Reply)
Discussion started by: Bibhusisa
1 Replies

10. Shell Programming and Scripting

find files in sub dir with tag & add "." at the beginning [tag -f "Note" . | xargs -0 {} mv {} .{}]

I am trying find files in sub dir with certain tags using tag command, and add the period to the beginning. I can't use chflags hidden {} cause it doesn't add period to the beginning of the string for web purpose. So far with my knowledge, I only know mdfind or tag can be used to search files with... (6 Replies)
Discussion started by: Nexeu
6 Replies
mlib_VideoColorBlendABGR(3MLIB) 			    mediaLib Library Functions				   mlib_VideoColorBlendABGR(3MLIB)

NAME
mlib_VideoColorBlendABGR, mlib_VideoColorBlendABGR_ResetAlpha - image blend SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> void mlib_VideoColorBlendABGR(mlib_u32 *dst, const mlib_u32 *src1, const mlib_u32 *src2, mlib_s32 src1_w, mlib_s32 src1_h, mlib_s32 src2_w, mlib_s32 src2_h, mlib_s32 src2_x, mlib_s32 src2_y, mlib_s32 dst_lb, mlib_s32 src1_lb, mlib_s32 src2_lb, mlib_blend src1_blend, mlib_blend src2_blend); void mlib_VideoColorBlendABGR_ResetAlpha(mlib_u32 *dst, const mlib_u32 *src1, const mlib_u32 *src2, mlib_s32 src1_w, mlib_s32 src1_h, mlib_s32 src2_w, mlib_s32 src2_h, mlib_s32 src2_x, mlib_s32 src2_y, mlib_s32 dst_lb, mlib_s32 src1_lb, mlib_s32 src2_lb, mlib_blend src1_blend, mlib_blend src2_blend); DESCRIPTION
The functions use the following equation for blending images: dst = (src1 * src1_blend) + (src2 * src2_blend) The two multi-banded source images (src1 and src2) are blended together and stored in the destination image (dst). The image buffers pointed to by dst, src1, and src2 contain 4-banded ABGR images, 8 bits per component. src1_w and src1_h are the dimensions of the src1 input buffer. src2_w and src2_h are the dimensions of the src2 input buffer. The output buffer must be at least as large as the src1 input buffer. src2_x and src2_y are the offset of the src2 input buffer relative to src1. Where pixels in src2 overlap pixels in src1, the pixels are blended. Pixels in src1 which are outside of src2 are copied into dst. Pixels in the dst image outside of src1 are left unchanged. src1_blend specifies the blend function to be applied to the pixels of src1 image and src2_blend specifies the blend function to be applied to the pixels of src2. Possible blend functions are: MLIB_BLEND_ZERO MLIB_BLEND_ONE MLIB_BLEND_SRC_ALPHA MLIB_BLEND_ONE_MINUS_SRC_ALPHA MLIB_BLEND_DST_ALPHA MLIB_BLEND_ONE_MINUS_DST_ALPHA MLIB_BLEND_SRC_ALPHA is the alpha component of image src2 scaled to the range 0.0 to 1.0. MLIB_BLEND_DST_ALPHA is the alpha component of image src1 scaled to the range 0.0 to 1.0. All pixel components are treated as unsigned 8-bit quantities and the output pixel component values are clamped to the range 0 to 255. For the mlib_VideoColorBlendABGR_ResetAlpha() function, the alpha value of every pixel in destination image is set to 0 after blending is complete. PARAMETERS
Each of the functions takes the following arguments: dst Pointer to output image. src1 Pointer to 1st input image. src2 Pointer to 2nd input image. src1_w src1 image width in pixels. src1_h src1 image height in rows. src2_w src2 image width in pixels. src2_h src2 image height in rows. src2_x src2 horizontal displacement (in pixels), relative to the upper-left corner of src1. src2_y src2 vertical displacement (in rows), relative to the upper-left corner of src1. dst_lb Linebytes for output image. src1_lb Linebytes for 1st input image. src2_lb Linebytes for 2nd input image. src1_blend Blend function for src1 image. src2_blend Blend function for src2 image. RETURN VALUES
None. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_VideoColorBlendABGR_Inp(3MLIB), attributes(5) SunOS 5.10 10 Nov 2004 mlib_VideoColorBlendABGR(3MLIB)
All times are GMT -4. The time now is 01:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy