Sponsored Content
Top Forums Shell Programming and Scripting sed to check two condition need solution Post 302674767 by ranjancom2000 on Friday 20th of July 2012 10:21:29 AM
Old 07-20-2012
sed to check two condition need solution

Hi,

I am having a file in below format
HTML Code:
server-1 Win2008:server-1-1700,1774,290104720,290104987:server-1
server-2 AIX:server-2-:server-2 server-2
I want the output like this

HTML Code:
Win2008:server-1-1700,1774,290104720,290104987:standalon-server
AIX:server-2-:VIO-Sever
I used the cat script but i am not able to check to conduction
server-1 ---> Replace to standalon-server
server-2 server-2---> VIO server

Code:
cat all.txt |grep server-2|sed -e "s/server-2 //"| sed -e "s/server-2//"|sed -e "s/server-2/standalon-server/" "s/server-2 server-2/VIO/"

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Is There a Sed Solution for This?

Hi All, I'm trying to use sed to extract data within a String, but I'm having problems with sed command: Text: STATUS OSRC_R6_0_MENT_R1H_CU M_901662 R1H_LV1_20080313 Based from the Text above, I just need to extract this data R6_0 R1H_CU LV1 Is there a solution for this in... (1 Reply)
Discussion started by: racbern
1 Replies

2. UNIX for Advanced & Expert Users

Need solution concatenate and display 2 lines as 1 with a condition for 2 line ?

I have 2 pattern of lines (SQL query and Time taken)in a log i need to capture all SQL queries with time taken >20 sec and need to display as one line. 2 lines from log: 2007-10-23 11:39:17,061 DEBUG - SQL Query : SELECT A.GROUP_CD , C.FN_CD FROM UP_GROUP A , PRD_GROUP_TO_FN B , PRD_FN... (1 Reply)
Discussion started by: vithala
1 Replies

3. Shell Programming and Scripting

sed solution for condition checking

Hi all , Recently i came across this in FAQ's. I have a file cat rem.txt sreedhar 20 sreedhar 10 sreedhar 15 sreedhar 18 sreedhar 16 sreedhar 30 I have to replace sreedhar with "Sridhar" if the second parameter is > 18. I need to do it in "sed" only. I am wondering how this... (4 Replies)
Discussion started by: panyam
4 Replies

4. Shell Programming and Scripting

Urgent solution for simple sed

Hi Im running this command on AIX in ksh. My input file samp1 contains 1 2 123 12345 When I execute the following sed i dont get a matching pattern sed -n '/{1}/p' samp1 Can anyone help me with this simple thing (3 Replies)
Discussion started by: raghav288
3 Replies

5. Shell Programming and Scripting

WHILE LOOP CONDITION CHECK

Hello I want to compare values of two variables as CHECK condition in a while loop. eg: var1=0 var2=10 while do echo " $var1 " var1=`expr $var1 + 1` done However this is giving error.How to do it in a proper manner? Thanks. (3 Replies)
Discussion started by: dashing201
3 Replies

6. Shell Programming and Scripting

AWK or SED solution

Hello. I have big file data like this(part of file): .... 18210102021010000110 47401000000 021001 5166891.16 021011 5166891.16 18210602010020000110 47401000000 020701 8995421.00 021001 8995421.00 021011 8995421.00 030801 .08 18210604011020000110 47401000000 020701 9048.00 021001... (3 Replies)
Discussion started by: maxoff
3 Replies

7. UNIX for Dummies Questions & Answers

Condition check using awk

Hi, I have a file in the following format "SYLVESTER,WILLARD G"|"S00633600"|"221052958A"|"H2256"|"015"|""|"00000042BASJ"|"665303"|"N"|"20100211"|"380.4"|""|""|""|"5400"|"20110218"|""|"20110218"|"FEESC"|"D"|"F"|"P" "PURINGTON-KELLEY,C"|"S00808783"|"029424717A"|"H2256"|"024"|"MEMBER JOINED... (3 Replies)
Discussion started by: nua7
3 Replies

8. Shell Programming and Scripting

sed or awk Solution

Hi I am having a csv file like this ahsh,90.82,add,32424,ahha hhdh,98.89,hdhdh,92728,neha hshs,you,97.7,hdhdhd,are,a jsjsj,wonderful,9788,79.9,aheh ahdh,95.5,girl, 2737,jolllI need to add width="100" to the value which is greater than 90 like decimal points but less than 100 Output... (5 Replies)
Discussion started by: kshitij
5 Replies

9. Shell Programming and Scripting

Check two condition in while loop

Hi, I Have to check two condition in while loop every 2 minutes. while loop is accompanied with number of times it will check.Please help in putting the two condition in while loop as appropriate. z= input value, A=1 while do 1.check the file output,if the file output is N then keep on... (2 Replies)
Discussion started by: netdbaind
2 Replies
AuServer(3)						     Library Functions Manual						       AuServer(3)

Name
       AuServer - AuServer structure

Structures
       #include <audio/audiolib.h>

       typedef struct _AuServer
       {
	   . . .
       }AuServer;

MACROS
Do not dereference the members of the AuServer structure directly. Instead use the access macros. server is a pointer to a AuServer structure. AuServerConnectionNumber(server) Accesses the int connection number. AuServerQLength(server) Accesses the int value with the length of the input queue. AuServerVendor(server) Accesses the NUL-terminated string giving the identification of the audio server vendor. AuServerProtocolMajorVersion(server) Accesses the int value of the major protocol revision number of the audio server. AuServerProtocolMinorVersion(server) Accesses the int value of the minor protocol revision number of the audio server. AuServerVendorRelease(server) Accesses the int value with the release number of the audio server. AuServerString(server) Accesses the NUL-terminated string giving the server name. AuServerNextRequest(server) Accesses the AuUint32 serial ID of the next protocol request to be sent. AuServerLastKnownRequestProcessed(server) Accesses the AuUint32 serial ID of the last known protocol request sent. AuServerResourceBase(server) Accesses the AuID base used in constructing resource ID's. AuServerResourceMask(server) Accesses the AuID mask used in constructing resource ID's. AuServerMinSampleRate(server) Accesses the int value with the minimum sample rate supported by the server. AuServerMaxSampleRate(server) Accesses the int value with the maximum sample rate supported by the server. AuServerMaxTracks(server) Accesses the int value indicating the maximum number of tracks supported by the server. AuServerNumFormats(server) Accesses the int value indicating the number of formats supported by the server. AuServerNumElementTypes(server) Accesses the int value indicating the number of element types supported by the server. AuServerNumWaveForms(server) Accesses the int value indicating the number of waveform generators supported by the server. AuServerNumActions(server) Accesses the int value indicating the number of actions supported by the server. AuServerNumDevices(server) Accesses the int value indicating the number of server devices. AuServerNumBuckets(server) Accesses the int value indicating the number of server buckets. AuServerFormat(server, n) Accesses the int value of the n'th format supported by the server. AuServerElementType(server, n) Accesses the int value of the n'th element supported by the server. AuServerWaveForm(server, n) Accesses the int value of the n'th waveform supported by the server. AuServerAction(server, n) Accesses the int value of the n'th action supported by the server. AuServerDevice(server, n) Accesses the AuDeviceAttributes structure of the n'th server device. AuServerBucket(server, n) Accesses the AuBucketAttributes structure of the n'th server bucket. AuClientOfID(server, resource) Extracts the ClientID from resource. AuID AuAllocID(server) Invokes the ID allocator function. Description The AuServer structure describes the connection to the audio server. See Also AuCloseServer. audiolib - Network Audio System C Language Interface audiolib - 1.9.3 AuServer(3)
All times are GMT -4. The time now is 09:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy