Sponsored Content
Top Forums Shell Programming and Scripting Grep strings for different cases Post 302962001 by sam@sam on Monday 7th of December 2015 10:38:42 AM
Old 12-07-2015
the output stored in variable may contain either any one of the below:
1> access Denied for server
2> access for apache is successfull
3> couldn't access the server
if the above three are not stored in a variable then it prints a msg "unknown error"

more num
URL1
URL2
URL3

I have tried using exit 0 but its existing from code in 1st iteration...

Last edited by sam@sam; 12-07-2015 at 01:17 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

want to grep only strings in a file?

Hai, Just want to print only alphanumeric in a file ex:- fdsdsklf#@^%$#hf output:- fdsdsklfhf plz, help me:o (5 Replies)
Discussion started by: balan_mca
5 Replies

2. Shell Programming and Scripting

Grep Multiple Strings

Hi, Can any one pelase tell me how to grep multiple strings from multiple files in a singel folder? grep -E "string1|string2|string3|string4|string..." its taking lots of time.. can any please tell me fast grep??? URGENT (10 Replies)
Discussion started by: durgaprasad
10 Replies

3. Shell Programming and Scripting

grep two strings in a file..

Hello All, I have a big file about 1000 lines. Now i am trying to grep a particular string and printing the lines from the string. say for example in 500th line i have the date as "Mon Wed 14 20:15:24 2010". now i in my case i need to grep the combination of the strings "Mon Wed 14" and the... (7 Replies)
Discussion started by: intiraju
7 Replies

4. Shell Programming and Scripting

Can't grep multiple strings

I have a script that periodically checks the Apache error_log to search for a specific error that causes it to hand and, if found, it restarts the service. I recently found another error that forces it to hand and won't serve pages until it is reset. What I'm trying to do is to get the script to... (3 Replies)
Discussion started by: cfjohnsn
3 Replies

5. UNIX for Dummies Questions & Answers

Grep help (match two strings one line)

Hello, Here I have some grep command which is not working correctly: cat file1.txt: apples Date: Sun, 24 Feb 2013 8:14:06 -0800 peaches melons cherry sky cloud green purple yellow cat file2.txt: apples Date peaches melons 0800 cherry sky cloud green purple black (2 Replies)
Discussion started by: holyearth
2 Replies

6. Shell Programming and Scripting

Grep 2 same strings in a same line??

I have this code TrackingId:1362412470675;MSISDN:; INFO - number of clietns:3:Received response is: EMSResponse , protocolVersion=5, purchaseOptions=null, serviceData=ServiceData , screenData=CanvasData ]], title=null, titleResource=MessageResource], screenType=null]], serviceId=idBamboo,... (7 Replies)
Discussion started by: nikhil jain
7 Replies

7. Red Hat

Grep between two strings in shell

<cisco:subname> <cisco:sptp>Cisco PortA Series</cisco:sptp> <cisco:aliasNameList xsi:nil="true"/> <cisco: owner xsi:nil="true"/> <cisco:subportname> <cisco:cpt>Cisco SubPort B Series</cisco:cpt> ... (3 Replies)
Discussion started by: itsspy
3 Replies

8. Shell Programming and Scripting

GREP between last occurrences of two strings

Hi I have the server.log file as: Server Stopped ABC DEF GHI JKL Server Started MNO PQR STU Server Stopped VWX YZ ABC Server Started Server Stopped 123 456 789 (9 Replies)
Discussion started by: ankur328
9 Replies

9. Shell Programming and Scripting

Grep process with two strings

Hi, I am trying to get the PID of a process that is defunct. I have two quesitons on this. 1) how do I pass in two strings? This is what I am using now: ps -ef |egrep -i "programname|<defunct>" But this returns multiple results with the word defunct in them. 2) How do I make it so that... (1 Reply)
Discussion started by: ChickenPox
1 Replies

10. Shell Programming and Scripting

Grep for strings

Hi, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36 How can I grep for the strings chrome and safari from a file, and if chrome print Chrome/40.0.2214.94 to a file and also count the number of times chrome is found? ... (4 Replies)
Discussion started by: cyberfrog
4 Replies
FESTIVAL(1)						      General Commands Manual						       FESTIVAL(1)

NAME
festival_client - client access to festiva; text-to-speech server mode SYNOPSIS
festival_client [options] [file0] [file1] ... DESCRIPTION
Allows sending commands and/or test to a festival test-to-speech server. Festival may be started in server mode using the option --server festival-clinet allows waveforms ot be generated faster as not time is required for start up. See the festival manual for more details on recommended use. OPTIONS
--server <string> hostname (or IP number) of server --port <int> {1314} port number of server proces (1314) --output <string> file to save output waveform to --otype <string> {nist} output type for waveform --passwd <string> server passwd in plain text (optional) --prolog <string> filename containing commands to be sent to the server before standard commands (useful when using --ttw) --async Asychronous mode, server may send back multiple waveforms per text file --ttw Text to waveform: take text from first arg or stdin get server to return waveform(s) stored in output or operated on by aucommand. --withlisp Output lisp replies from server. --tts_mode <string> TTS mode for file (default is fundamental). --aucommand <string> command to be applied to each waveform retruned from server. Use $FILE in string to refer to waveform file BUGS
This still isn't as general as it should be. It seems to require lots of special little options which suggests the general options aren't right. AUTHOR
Alan W Black and Paul Taylor (C) Centre for Speech Technology Research University of Edinburgh 80 South Bridge Edinburgh EH1 1HN http://www.cstr.ed.ac.uk/projects/festival.html 1st Aug 1997 FESTIVAL(1)
All times are GMT -4. The time now is 07:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy