Sponsored Content
Top Forums Shell Programming and Scripting Greping the required parameter... Post 302180723 by era on Tuesday 1st of April 2008 02:22:40 AM
Old 04-01-2008
Pedestrian solution: awk script to remember the name it has seen last, and print it when it sees the right parent. Forget the previous name when you see an empty line.

Slightly more advanced: perl has a way to read multiple lines; if you know the basics of the language, looking for $/ in examples and in the FAQ should be enough for you.

Enterprise solution: hire an incompetent consultant to write 67 Java classes which altogether fail to correctly parse this file format.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

GREPing for Nulls

I just had a filesystem / file corruption issue on my HSP's server due to disk capacity limits and fileswapping. I discovered that certain files got corrupted when fileswapping was not successful and they ended up with a string of control characters, or what I believe to be nulls, in them. Does... (4 Replies)
Discussion started by: Dr. DOT
4 Replies

2. Shell Programming and Scripting

Greping certain lines

One of my outout is like this as shown below. How can I grep only the lines after the line "Affected files ...". No of lines after the line "Affected files ..." may vary. $ cat file_A Change 149133 by csaha@test_depo_csaha on 2006/02/08 01:40:57 *pending* This is to test change #... (5 Replies)
Discussion started by: csaha
5 Replies

3. Shell Programming and Scripting

Help required to pass the parameter

i am calling a pl/sql procedure through a shell script, there is one IN and 2 OUT parameter required to pass to the procedure to execute.. My procedure is XX_CITIDIRECT_EXP_PKG.main_proc and In parameter is p_period which I wanto to pass 'MAY-06'. Can anyone figure out, whats is wrong here ... (4 Replies)
Discussion started by: u263066
4 Replies

4. Shell Programming and Scripting

how do I make dynamic parameter names? Or get the value of a parameter evaluated twi

Say I write something like the following: var1=1 var2=2 for int in 1 2 do echo "\$var$int" done I want the output to be: 1 2 Instead I get something like: $var1 $var2 (2 Replies)
Discussion started by: Awanka
2 Replies

5. Shell Programming and Scripting

need help in greping

i have a ksh script : #!/bin/ksh TZ=`date +%Z`+24 ;a=`date +%Y-%m-%d` b=`date +"%H:%M:%S"` cd /ednadtu3/u01/pipe/logs for i in Archiver1.log do cat $i | grep $a | grep $b >> /ednadtu3/u01/pipe/naveed/Insert_Date.txt done... (4 Replies)
Discussion started by: ali560045
4 Replies

6. Shell Programming and Scripting

Getting required fields from a test file in required fromat in unix

My data is something like shown below. date1 date2 aaa bbbb ccccc date3 date4 dddd eeeeeee ffffffffff ggggg hh I want the output like this date1date2 aaa eeeeee I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies

7. Shell Programming and Scripting

need help in greping

Hi, i have to find a string in a file and positin of the string in the file would come in some particular interval. let's say file is 1-1000 lines and string is in from 200-300line. could any one suggest me how to get make the grep search for the string in that particular portion of the... (4 Replies)
Discussion started by: tarakant
4 Replies

8. Shell Programming and Scripting

Command that takes one parameter and then searches for the passed in parameter

Hi I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/ Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies

9. Shell Programming and Scripting

Passing parameter to script, and split the parameter

i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two if then echo " Usage : <$0> <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi (5 Replies)
Discussion started by: only4satish
5 Replies

10. UNIX for Dummies Questions & Answers

Best Alternative for checking input parameter contains required value or not

Any good way to check if code has the required output # /sbin/sysctl net.ipv4.icmp_echo_ignore_broadcasts net.ipv4.icmp_echo_ignore_broadcasts = 1 /sbin/sysctl net.ipv4.icmp_echo_ignore_broadcasts | grep "= 1" net.ipv4.icmp_echo_ignore_broadcasts = 1 What I can think of is above, and it... (16 Replies)
Discussion started by: alvinoo
16 Replies
gss_inquire_cred_by_mech(3)				     Library Functions Manual				       gss_inquire_cred_by_mech(3)

NAME
gss_inquire_cred_by_mech() - provide the calling application per-mechanism information about a credential SYNOPSIS
DESCRIPTION
The routine provides per-mechanism information about a credential. Input Parameters cred_handle Specifies a handle for the target credential. To get information about the default credential, specify mech_type Set of security mechanisms for which information should be returned. Output Parameters name Returns the principal name asserted by the credential. If the principal name is not required, specify NULL. initiator_lifetime Returns the number of seconds for which the credential will remain capable of initiating security contexts under the specified mechanism. If the credential can no longer be used to initiate contexts, or if the credential usage for this mechanism is this parameter will be set to zero. If the implementation does not support expiration of initiator credentials, the parameter returns the value If an expiration time is not required, specify NULL. acceptor_lifetime Returns the number of seconds for which the credential will remain capable of accepting security contexts under the specified mechanism. If the implementation does not support expiration of initiator credentials, the parameter returns the value If an expiration time is not required, specify NULL. cred_usage Returns one of the following values describing how the application can use the credential: If no usage information is required, specify NULL. minor_status Returns a status code from the security mechanism. STATUS CODES
The following status codes can be returned: The routine was completed successfully. The credentials expired. If the lifetime parameter was passed as NULL, it is set to 0 (zero). The credentials were invalid. The routine failed. Check the minor_status parameter for details. The routine could not access the credentials. AUTHOR
was developed by Sun Microsystems, Inc. SEE ALSO
gss_acquire_cred(3). The manpages for DCE-GSSAPI are included with the DCE-CoreTools product. To see those manpages add to gss_inquire_cred_by_mech(3)
All times are GMT -4. The time now is 01:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy