Sponsored Content
Top Forums Shell Programming and Scripting Print last occurrence if first field match Post 302146030 by Raynon on Friday 16th of November 2007 08:59:38 AM
Old 11-16-2007
Thanks vgersh99!! Smilie
Thanks for your guidance!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to Match first field of two Files and print

Hi, I want to get script or command in Sun Unix which matches first fields of both the files and print the feilds of one files, example may make it more clear. InputFile1 ================== Alex,1,fgh Menthos,45454,toto Gothica,855,ee Zenie4,77,gg Salvatore,66,oo Dhin,1234,papapa... (3 Replies)
Discussion started by: indian.ace
3 Replies

2. Shell Programming and Scripting

last occurrence of a match through multiple files

Hi all, I have a lot of files with extension ".o" and I would like to extract the 10th line after (last) occurrence of a given string in each of the files. I tried: $ grep "string_to_look_for" *.o -A 10 | tail -1 but it gives the occurrence in the last file with extension .o ... (1 Reply)
Discussion started by: f_o_555
1 Replies

3. Shell Programming and Scripting

sed print from last occurrence match until the end of file

Hi, i have file f1.txt with data like: CHECK a b CHECK c d CHECK e f JOB_START .... I want to match the last occurrence of 'CHECK' until the end of the file. I can use awk: awk '/^CHECK/ { buf = "" } { buf = buf "\n" $0 } END { print buf }' f1.txt | tail +2Is there a cleaner way of... (2 Replies)
Discussion started by: ysrini
2 Replies

4. 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

5. UNIX for Dummies Questions & Answers

[Solved] Replace first occurrence after match

hey guys, i have been trying to work this thing out with sed with no luck :confused: i m looking for a way to replace only the first occurrence after a match for example : Cat Realized what you gotta do Dog Realized what you gotta do Sheep Realized what you gotta do Wolf Realized... (6 Replies)
Discussion started by: boaz733
6 Replies

6. Shell Programming and Scripting

Egrep - Only Match First Occurrence

echo 'String#1 and String#2' | egrep -o -m 1 'String#.{1}' String#1 String#2 I'm trying to just match the first occurrence of 'String#' + 1 character. I thought the "-m 1" switch would do that for me. Instead I get both occurrences. Can somebody provide some insight? Thanks! (5 Replies)
Discussion started by: sudo
5 Replies

7. Shell Programming and Scripting

Match columns and print specific field

Hello, I have data in following format. ... (6 Replies)
Discussion started by: Pushpraj
6 Replies

8. Shell Programming and Scripting

Command/script to match a field and print the next field of each line in a file.

Hello, I have a text file in the below format: Source Destination State Lag Status CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies

9. Shell Programming and Scripting

sed print from last occurrence match until the end of last occurrence match

Hi, i have file file.txt with data like: START 03:11:30 a 03:11:40 b END START 03:13:30 eee 03:13:35 fff END jjjjjjjjjjjjjjjjjjjjj START 03:14:30 eee 03:15:30 fff END ggggggggggg iiiiiiiiiiiiiiiiiiiiiiiii I want the below output START (13 Replies)
Discussion started by: Jyotshna
13 Replies

10. Shell Programming and Scripting

awk to print text in field if match and range is met

In the awk below I am trying to match the value in $4 of file1 with the split value from $4 in file2. I store the value of $4 in file1 in A and the split value (using the _ for the split) in array. I then strore the value in $2 as min, the value in $3 as max, and the value in $1 as chr. If A is... (6 Replies)
Discussion started by: cmccabe
6 Replies
Speech(3)						User Contributed Perl Documentation						 Speech(3)

NAME
Mac::Speech - Provide interface to PlainTalk (Speech Manager) SYNOPSIS
use Mac::Speech; DESCRIPTION
Access to Inside Macintosh is essential for proper use of these functions. Explanations of terms, processes and procedures are provided there. Any attempt to use these functions without guidance can cause severe errors in your machine, including corruption of data. You have been warned. Variables %Voice The %Voice hash will return the index to the first voice whose name matches the given text. Constants kTextToSpeechSynthType kTextToSpeechVoiceType kTextToSpeechVoiceFileType kTextToSpeechVoiceBundleType Speech Types. kNoEndingProsody kNoSpeechInterrupt kPreflightThenPause Synthesizer flags. kImmediate kEndOfWord kEndOfSentence Where to stop. kNeuter kMale kFemale Genders. Types VoiceDescription Voice Description Record. long length size of structure--set by application VoiceSpec voice voice synthesizer and ID info long version version number of voice Str63 name name of voice Str255 comment text information about voice short gender neuter, male, or female short age approximate age in years short script script code of text voice can process short language language code of voice output short region region code of voice output VoiceSpec Voice Specification Record. OSType creator ID of required synthesizer OSType id ID of voice on the synthesizer Functions SpeechManagerVersion CountVoices GetIndVoice INDEX GetVoiceDescription VOICE NewSpeechChannel VOICE DisposeSpeechChannel CHAN SpeakString S SpeakText CHAN, TEXT SpeakBuffer CHAN, TEXT, CONTROLFLAGS StopSpeech CHAN StopSpeechAt CHAN, WHERETOSTOP PauseSpeechAt CHAN, WHERETOPAUSE ContinueSpeech CHAN SpeechBusy SpeechBusySystemWide SetSpeechRate CHAN, RATE GetSpeechRate CHAN SetSpeechPitch CHAN, PITCH GetSpeechPitch CHAN TextToPhonemes CHAN, TEXT SpeechToFile CHAN, PATH Set speech channel CHAN to output to file PATH. AUTHOR
Written by Matthias Ulrich Neeracher <neeracher@mac.com>. Currently maintained by Chris Nandor <pudge@pobox.com>. perl v5.16.2 2013-08-25 Speech(3)
All times are GMT -4. The time now is 08:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy