Sponsored Content
Full Discussion: text manipulation
Top Forums Shell Programming and Scripting text manipulation Post 302202295 by injeti on Wednesday 4th of June 2008 01:00:39 PM
Old 06-04-2008
i will try that, the output seems to be exactly what i wanted but i dont need space & doube quotes in between 1081 "WPCW

output should be like this:
1081WPCW 19 - CW/AM1, WPCB 40 - FAMN/CORNER, WPCB-DT1 50 - FAMN/CORNER, W35AW - Various Shopping Pgms W41CF - TBN W47CV - TBN WLLS-LP 49 - AM1 WATCH WPXI 11 N & WPIX 11 CW

1082WPCW 19 - CW/AM1, WTRF-DT2 32 - F/MY, WPCB 40 - FAMN/CORNER, WKBS-DT1 46 - FAMN/CORNER, WKBS 47 - FAMN/CORNER, WPCB-DT1 50 - FAMN/CORNER W45BT - FAMN/CORNER W47CV - TBN WLLS-LP 49 - AM1 WATCH WPXI 11 N & WPIX 11 CW WATCH WPGH 53 F & WWCP 08 F

1086WPCW 19 - CW/AM1, WFPT-DT3 28 - V-ME, WTRF-DT2 32 - F/MY, WPCB 40 - FAMN/CORNER,WKBS-DT1 46 - FAMN/CORNER, WKBS 47 - FAMN/CORNER,WPCB-DT1 50 - FAMN/CORNER, WGPT-DT3 54 - V-ME W35AW - Various Shopping Pgms W47CV - TBN WATCH WPXI 11 N & WPIX 11 CW WATCH WPGH 53 F & WWCP 08 F
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Text Manipulation.

Hi I have only ever used awk and sed for basic requirements up until now. I have had to break a log down for multiple purposes. Using awk, sed and a date script. I am left with this: (message id, time of msg attempt, message id, domain name, time of msg completion) ... (4 Replies)
Discussion started by: Icepick
4 Replies

2. UNIX for Dummies Questions & Answers

text manipulation

I am tryin to figure out how to extract interested text from file example.txt blah blah blah a: child1 blah a: child2 blah b: parent1 blah blah blah .... blah a: child21 blah a: child22 blah a: child23 blah b: parent2 this kinda text repeats .. number of children is... (6 Replies)
Discussion started by: rajkishore
6 Replies

3. UNIX for Dummies Questions & Answers

Help with text manipulation

Hi there, I have some text files in unix format that processed by a program in windows, and when I open them with less or vi in linux, a warn for opening binary file is prompted, and as shown in vi, between every two characters there was inserted a "^@". How can I fix this. Plus, there are over... (2 Replies)
Discussion started by: dustinwang2003
2 Replies

4. UNIX for Dummies Questions & Answers

Text Manipulation

Greetings. Iīm a biologist and I donīt have mucho knowledge on Unix/Linux, but I need to use Cygwin to change some documents from a GenBank format to a FASTA format. GenBank format goes somthing like this: LOCUS NM_013964 2568 bp mRNA linear PRI 26-APR-2009... (2 Replies)
Discussion started by: vanesa1230
2 Replies

5. Shell Programming and Scripting

[HELP] Text manipulation... [HELP]

I need to know how can I remove all word after comma on each line. Like: jjkj,iiuiui,ijlkjkij,ookoo kijljlj,jhhkj,ijijkijkj,oijkijj kjkljlkj,kjkjlkjlkj,opok,okop to jjkj, kijljlj, ... (5 Replies)
Discussion started by: slutb3
5 Replies

6. UNIX for Dummies Questions & Answers

text manipulation help

Hello again unix.com How can I extract from a large file in format: steve@aol.com steve hawkins Location of this member is bla bla bla sun@hotmail.com Sun Ying This member is using browser bla bla bla to another text in format: steve@aol.com steve hawkins sun@hotmail.com sun ying ... (5 Replies)
Discussion started by: galford
5 Replies

7. UNIX for Dummies Questions & Answers

Text Manipulation Help

Hello Unix.com, I have a text in format: john sara lee How can I make it: john:john john:john1 john:john12 john:john123 sara:sara sara:sara12 sara:sara123 and so on (2 Replies)
Discussion started by: galford
2 Replies

8. UNIX for Dummies Questions & Answers

Text manipulation help

Hello unix.com users, I have a ip file (line-by-line). How can I delete the ips that keep repeating by mark XXX.XXX.XXX.* ... I want to erase only the lines that keep repeating more than 2 times. Example: 1.2.3.1 1.2.3.2 1.2.3.3 I want to erase all ips blocks that are repeating by C... (1 Reply)
Discussion started by: galford
1 Replies

9. Shell Programming and Scripting

Text manipulation help

Hello again, I have a problem manipulating a large text document and there is no way I could edit this document by hand. Format is: Address : XXXX N 37 Ave, Hollywood, FL, 33021 Phone: XXX3190XXX Player: XXXXXX Character: Jaramillo DOB: June-14-1995 ----- Name: Alexandra Ticket... (3 Replies)
Discussion started by: galford
3 Replies

10. Shell Programming and Scripting

Help text manipulation

Hello Forum , I need a help about text manupulation. I have a text file and I have to manipulate this file. Let's say source.txt source.txt UNB+UNOC:3+O0013000005MAN MN RVS:91+0098006688:92+190304:2313+F004169241' UNH+8146848+DELJIT:D:96A:UN' BGM+307:::JIS_SYNCRO_FIRM+2019030423234101+9'... (8 Replies)
Discussion started by: cemokam65
8 Replies
watchmalloc(3MALLOC)					Memory Allocation Library Functions				      watchmalloc(3MALLOC)

NAME
watchmalloc, cfree, memalign, valloc - debugging memory allocator SYNOPSIS
#include <stdlib.h> void *malloc(size_t size); void free(void *ptr); void *realloc(void *ptr, size_t size); void *memalign(size_t alignment, size_t size); void *valloc(size_t size); void *calloc(size_t nelem, size_t elsize); void cfree(void *ptr, size_t nelem, size_t elsize); #include <malloc.h> int mallopt(int cmd, int value); struct mallinfo mallinfo(void); DESCRIPTION
The collection of malloc() functions in this shared object are an optional replacement for the standard versions of the same functions in the system C library. See malloc(3C). They provide a more strict interface than the standard versions and enable enforcement of the inter- face through the watchpoint facility of /proc. See proc(4). Any dynamically linked application can be run with these functions in place of the standard functions if the following string is present in the environment (see ld.so.1(1)): LD_PRELOAD=watchmalloc.so.1 The individual function interfaces are identical to the standard ones as described in malloc(3C). However, laxities provided in the stan- dard versions are not permitted when the watchpoint facility is enabled (see WATCHPOINTS below): o Memory may not be freed more than once. o A pointer to freed memory may not be used in a call to realloc(). o A call to malloc() immediately following a call to free() will not return the same space. o Any reference to memory that has been freed yields undefined results. To enforce these restrictions partially, without great loss in speed as compared to the watchpoint facility described below, a freed block of memory is overwritten with the pattern 0xdeadbeef before returning from free(). The malloc() function returns with the allocated memory filled with the pattern 0xbaddcafe as a precaution against applications incorrectly expecting to receive back unmodified memory from the last free(). The calloc() function always returns with the memory zero-filled. Entry points for mallopt() and mallinfo() are provided as empty routines, and are present only because some malloc() implementations pro- vide them. WATCHPOINTS
The watchpoint facility of /proc can be applied by a process to itself. The functions in watchmalloc.so.1 use this feature if the following string is present in the environment: MALLOC_DEBUG=WATCH This causes every block of freed memory to be covered with WA_WRITE watched areas. If the application attempts to write any part of freed memory, it will trigger a watchpoint trap, resulting in a SIGTRAP signal, which normally produces an application core dump. A header is maintained before each block of allocated memory. Each header is covered with a watched area, thereby providing a red zone before and after each block of allocated memory (the header for the subsequent memory block serves as the trailing red zone for its preced- ing memory block). Writing just before or just after a memory block returned by malloc() will trigger a watchpoint trap. Watchpoints incur a large performance penalty. Requesting MALLOC_DEBUG=WATCH can cause the application to run 10 to 100 times slower, depending on the use made of allocated memory. Further options are enabled by specifying a comma-separated string of options: MALLOC_DEBUG=WATCH,RW,STOP WATCH Enables WA_WRITE watched areas as described above. RW Enables both WA_READ and WA_WRITE watched areas. An attempt either to read or write freed memory or the red zones will trigger a watchpoint trap. This incurs even more overhead and can cause the application to run up to 1000 times slower. STOP The process will stop showing a FLTWATCH machine fault if it triggers a watchpoint trap, rather than dumping core with a SIGTRAP signal. This allows a debugger to be attached to the live process at the point where it underwent the watchpoint trap. Also, the various /proc tools described in proc(1) can be used to examine the stopped process. One of WATCH or RW must be specified, else the watchpoint facility is not engaged. RW overrides WATCH. Unrecognized options are silently ignored. LIMITATIONS
Sizes of memory blocks allocated by malloc() are rounded up to the worst-case alignment size, 8 bytes for 32-bit processes and 16 bytes for 64-bit processes. Accessing the extra space allocated for a memory block is technically a memory violation but is in fact innocuous. Such accesses are not detected by the watchpoint facility of watchmalloc. Interposition of watchmalloc.so.1 fails innocuously if the target application is statically linked with respect to its malloc() functions. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
proc(1), bsdmalloc(3MALLOC), calloc(3C), free(3C), malloc(3C), malloc(3MALLOC), mapmalloc(3MALLOC), memalign(3C), realloc(3C), valloc(3C), libmapmalloc(3LIB), proc(4), attributes(5) SunOS 5.10 25 Apr 2001 watchmalloc(3MALLOC)
All times are GMT -4. The time now is 05:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy