Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Finding & Replacing specific Fields Post 302277223 by ddraj2015 on Thursday 15th of January 2009 05:38:29 PM
Old 01-15-2009
Ygor:

Thanks for response. It did work. Would you please tell me how it all came together? Especially at \....000\)000/\1. Please let me know this would give us in what we need. Thanks ahead for the help. It really helped me.

sed 's/\(|....-..-.. ..:..:..\....000\)000/\1/g' file1
 

10 More Discussions You Might Find Interesting

1. Solaris

finding & replacing blank rows/spaces in a file

Can anyone help me find and replace blank rows in a file with a numeric value (ie blankrow=someTxtOrNumValue), the file is over 500,000 rows long so it would need to be the quickest way as I'll need to do this for multiple files...I would be greatfull for any suggestions....thanks sample file:... (2 Replies)
Discussion started by: Gerry405
2 Replies

2. Shell Programming and Scripting

Replacing Last occurance of & from a string

Hi All, Could anyone help me out in the below requirement: I have a text(XML) file like this: - <Dim2> <Properties Name="" State="2" ShowHir="-1" ApplyFilter="-1" ExpandToLevel="1" BreakHierType="1" MaxDepth="1" SlicerSelectOptions="1" ShowLeaf="0" HasGroup="0" /> <Expanded... (1 Reply)
Discussion started by: vivekshady
1 Replies

3. Shell Programming and Scripting

help with finding & replacing pattern in a file

Hi everyone. Could u be so kind and help me with on "simple" shell script? 1. i need to search a file line by line for a pattern. example of a lines in that file 2947 domain = feD,id = 00 0A 02 48 17 1E 1D 39 DE 00 0E 00,Name Values:snNo = f10 Add AttFlag = 0 2. i need to find... (0 Replies)
Discussion started by: dusoo
0 Replies

4. Shell Programming and Scripting

Specifying and replacing fields with awk

#cat BATCH007.TXT 01,661060052,061000104,081118,0915,07,80,1,2/ 99,,,2/ I have this file called BATCH007.TXT. I am trying to change fields 2 and 3 on line 2 to have zeroes. Like this: 01,661060052,061000104,081118,0915,07,80,1,2/ 99,0,0,2/ I can use these commands to print identify the... (2 Replies)
Discussion started by: ddurden7
2 Replies

5. Shell Programming and Scripting

Replacing fields

Hi! I have a file somefile.txt: 12, 1, a, b, c, d, e, f 12, 1, a, b, c, d, e, f 17, 51, a, b, c, d, e, f ... I've made this script to read two fields from a line and output a third: cat somefile.txt | awk -F, '{if ($1 == "12" && $2== "1") print "19"; else if ($1 == "17" && $2== "51")... (8 Replies)
Discussion started by: Tr0cken
8 Replies

6. Shell Programming and Scripting

Replacing certain fields from certain rows

Hi all, say for example i have the next input file 30 Au 7.500000 7.500000 5.774000 Au 7.500000 8.995000 8.363000 Au 7.500000 6.005000 8.363000 Au 20.633000 7.500000 9.226000 Au 20.632000 6.005000 6.637000 Au 20.632000 ... (4 Replies)
Discussion started by: ezitoc
4 Replies

7. Shell Programming and Scripting

sort & uniq on specific fields problem

Hello; I have the output data set from: egrep -i 'warning| error| fail' /var/adm/syslog/syslog.log Jan 31 12:02:18 fidsrv vmunix: LVM: WARNING: VG 128 0x001000: LV 5: Some I/O requests to this LV are waiting Jan 31 12:02:23 fidsrv vmunix: Asynchronous write failed on LUN (dev=0x100000f)... (3 Replies)
Discussion started by: delphys
3 Replies

8. Shell Programming and Scripting

Finding a text in files & replacing it with unique strings

Hallo Everyone. I have to admit I'm shell scripting illiterate . I need to find certain strings in several text files and replace each of the string by unique & corresponding text. I prepared a csv file with 3 columns: <filename>;<old_pattern>;<new_pattern> ... (5 Replies)
Discussion started by: gordom
5 Replies

9. Shell Programming and Scripting

Swapping/replacing fields

Hallo Team, I would like to replace filed 4 and 7 with filed 39 how can i achieve this ? -bash-3.2$ cat dip1.csv| cut -f4,7,24,36,39 -d","|sort -u +27113996891,+27113996891,196.35.130.52,828854047,+27873500077 +27116452690,+27825702918,10.0.109.13:5060,+27116452690,+27116452690... (2 Replies)
Discussion started by: kekanap
2 Replies

10. Shell Programming and Scripting

Replacing entire fields with specific text at end or beginning of field

Greetings. I've got a csv file with data along these lines: Spumoni's Pizza Place, Placemats n Things, Just Lamps Counterfeit Dollars by Vinnie, Just Shades, Dollar StoreI want to replace the entire comma-delimited field if it matches something ending in "Place" or beginning with "Dollar",... (2 Replies)
Discussion started by: palmfrond
2 Replies
ENVEXT(1)						  The Canonical Csound Reference						 ENVEXT(1)

NAME
envext - Extracts the envelope of a file to a text file. . SYNTAX
envext [-flags] soundfile csound -U envext [-flags] soundfile INITIALIZATION
soundfile - Name of the input soundfile. The following flags are available for envext (The default values are stated in parenthesis): -o fnam Name of output filename (newenv) -w size (in seconds) of analysis window (0.25) The envext utility generates a text file containing time and amplitude pairs by finding the absolute peak within each window. EXAMPLE
Using the command (while in the manual directory): csound -U envext examples/mary.wav will produce the a text file containing the following: 0.000 0.000 0.000 0.000 0.250 0.000 0.500 0.000 0.750 0.000 1.249 0.170 1.499 0.269 1.530 0.307 1.872 0.263 2.056 0.304 2.294 0.241 2.570 0.216 2.761 0.178 3.077 0.011 3.251 0.001 3.500 0.000 Which shows the time for the peak amplitude within each measured window. CREDITS
Author: John ffitch 1995 AUTHORS
Barry Vercoe MIT Media Lab Author. Dan Ellis MIT Media Lab, Cambridge Massachussetts Author. COPYRIGHT
5.10 08/01/2011 ENVEXT(1)
All times are GMT -4. The time now is 06:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy