Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Serach pattern in one field and replace in another Post 302677469 by Ygor on Thursday 26th of July 2012 06:55:07 AM
Old 07-26-2012
Try...
Code:
awk 'BEGIN{FS=OFS="\t"}$3~s{$6=r}1' s='common/bin/my/home' r='happy Home' sample.rpt

This User Gave Thanks to Ygor For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find pattern and replace another field

HI all I have a problem, I need to replace a field in a file, but only in the lines that have some pattern, example: 100099C01101C00000000059394200701CREoperadora_TX 100099C01201C00000000000099786137OPERADORA_TX2 in the example above I need to change the first field from 1 to 2 only if... (3 Replies)
Discussion started by: sergiioo
3 Replies

2. Shell Programming and Scripting

serach and replace a specific pattern or value in a xml file

can some one help me with a perl command i have to search and replace a version from a xml-file so i use in a ksh script a command like this ssh $GLB_ACC@$GLB_HOST "/usr/contrib/bin/perl -pi -e "s/$curVersion/$new_Version/g" $Dest_dir/epi.xml" this command worked so far, but the problem... (1 Reply)
Discussion started by: kiranreddy1215
1 Replies

3. UNIX for Dummies Questions & Answers

Pattern Matching - serach and replace script

My requirement is to replace a a particular pattren in a script from A to B. I am not sure if this can be done through sed command or through awk . The file sv.inc is window DialogBox AddConnection tag "~ActiveApp/Add Connection - Provider Type?URL" I would wnat the file to be... (10 Replies)
Discussion started by: bsandeep_80
10 Replies

4. Shell Programming and Scripting

pattern serach using grep

Frds I have to search for a string which is starting with brighton which will be first in the line of a text file test1.txt. The contents of test1.txt are file names like ----- brighton brighton_gt hst_brighton gst_brighton -------so many files------ --------- i have retrieve only... (3 Replies)
Discussion started by: KiranKumarKarre
3 Replies

5. UNIX for Dummies Questions & Answers

Serach a pattern

Hi, I am trying to find a particular patter in multiple UNIX files (also contain system files,hidden files and normal files) i am now using CMD: egrep -ali 'pattern' * i am not getting the required result, i just need files path and finename Naveen (3 Replies)
Discussion started by: Naveen_5960
3 Replies

6. Shell Programming and Scripting

Replace a data in a field if that does not contain a particular pattern

Hi, I have a date/time field in my file. I have to search in all the records and append a timestamp to it, if the timestamp is missing in that field. Is there a possible awk solution for this? Field date format File1 ==== 1|vamu|payer|2007-12-02 02:01:30|bcbs|... (5 Replies)
Discussion started by: machomaddy
5 Replies

7. UNIX for Dummies Questions & Answers

Match pattern in a field, print pattern only instead of the entire field

Hi ! I have a tab-delimited file, file.tab: Column1 Column2 Column3 aaaaaaaaaa bbtomatoesbbbbbb cccccccccc ddddddddd eeeeappleseeeeeeeee ffffffffffffff ggggggggg hhhhhhtomatoeshhh iiiiiiiiiiiiiiii ... (18 Replies)
Discussion started by: lucasvs
18 Replies

8. Shell Programming and Scripting

Script to Serach pattern and give number of occurrences

Hi, I want a script which search for a pattern "good" in a huge file and provide me number of occurences of such pattern in a file. lets say i have a file test.txt contents as below good is good but good is sometime bad and sometime good you are very good and good is always good ... (7 Replies)
Discussion started by: sv0081493
7 Replies

9. Shell Programming and Scripting

Replace pattern from nth field from a file

$ cat /cygdrive/d/Final2.txt 1,A ,Completed, 07.03_23.01 ,Jun 30 20:00 2,BBB,Pending,, 3,CCCCC,Pending,, 4,DDDDD,Pending,, 5,E,Pending,, 6,FFFF,Pending,, 7,G,Pending,, In the above file 4th field is date which is in MM.DD_HH.MIN format and I need to convert it to as it is there in 5th... (1 Reply)
Discussion started by: Amit Joshi
1 Replies

10. Shell Programming and Scripting

Replace pattern from nth field from a file

I have posted this again as old post is closed and I am not able to reopen. so please consider this new post Input File : 1,A,Completed,06.02_19.36,Jun 30 20:00 2,BBB,Failed,07.04_05.12,Jul 21 19:06 3,CCCCC,New,07.21_03.03,Jul 26 12:57 4,DDDDD,Pending,, I wast output file as: ... (7 Replies)
Discussion started by: Amit Joshi
7 Replies
POC-FEC(1)							   User Command 							POC-FEC(1)

NAME
poc-fec - send FEC MP3 streams SYNOPSIS
poc-fec [ -s address ] [ -p port ] [ -t ttl ] [ -q ] [ -k fec_k ] [ -n fec_n ] files... DESCRIPTION
poc-fec is a streaming server sending mp3 data using a custom FEC protocol. The streamed MP3 frames are first decomposed in autonomous data units (ADUs). These ADUs are grouped into ADU groups, which are encoded redundantly using a FEC method by Luigi Rizzo. A group of k ADUs is encoded as n data packets. Any k of these n data packets is sufficient to recover the original k ADUs. It sends the files in the order given on the command-line. Use the filename - to stream from standard input. Normally, the FEC protocol is used to stream to multicast groups. OPTIONS
-s address Specify the address to send to (default 224.0.1.23). -p port Specify the port to send to (default 1500). -t ttl Specify the TTL parameter to be set on outgoing parameters (default 1). -q Don't output any information on standard error. -k fec_k Specify the number of ADUs that will be encoded as an ADU group (default 20). -n fec_n Specify the number of packets that the ADU groups will be encoded to (default 25). This number must be greater than the fec_k param- eter. EXAMPLES
poc-fec -s 224.0.1.24 -p 8989 -t 2 -k 16 -n 32 bla.mp3 Send the file bla.mp3 using the RTP RFC fec protocol to the address 224.0.1.24 on port 8989, and set the TTL to 2. MP3 frames of bla.mp3 are converted to ADUs and grouped in ADU groups of 16 ADUs. These 16 ADUs are encoded into 32 packets and streamed. A client will have to receive at least 16 packets to recover the original ADUs. AUTHORS
Manuel Odendahl <manuel@bl0rg.net>, Florian Wesch <dividuum@bl0rg.net> February 2005 POC-FEC(1)
All times are GMT -4. The time now is 02:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy