Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Confusion in working of carat(^) symbol Post 303009851 by scriptor on Thursday 21st of December 2017 05:50:11 AM
Old 12-21-2017
Confusion in working of carat(^) symbol

hi All,

i have googled and found that below are the functionality of carat symbol
Meaning of carat is
Code:
"at the beginning of line"; 
"it can also negate matches"

how do i know when carat is behaving as beginning of line or as a negate.

regards,
scriptor
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

confusion with export

Hi, I have written the following two scripts. a.ksh ---> FPATH=/users/kushard autoload b b echo "From a.ksh::" $aa b ---> function b { typeset aa aa="TRUE." echo "From b::" $aa export aa } (1 Reply)
Discussion started by: kdipankar
1 Replies

2. UNIX for Dummies Questions & Answers

unix confusion

:confused: some one please tell me where i can possibly find out what is unix 10.2 and the basic system functions of it is. I really need help! (1 Reply)
Discussion started by: tribb24
1 Replies

3. UNIX for Dummies Questions & Answers

wc command confusion

Can somebody explain it to me that why wc gives more chars suppose Ab.txt have two lines qwer qasd then wc -c ab.txt will give 10.why not 8.okay may be it is taking count one for each line just in case but why echo "qwer"|wc -C gives 5. Ok with \c it is returning 4. :) (6 Replies)
Discussion started by: Dhruva
6 Replies

4. UNIX for Dummies Questions & Answers

Invoke URL's from file and comment with # symbol which are not working

Hi All, my intention is read urls from a file (what ever url's it may be) but the url's which are not opening i.e which displays 404 , page not found error and so on should be commented in the file with # symbol. for the correct url's : nothing to be done(except script should validate... (0 Replies)
Discussion started by: gsp
0 Replies

5. UNIX for Dummies Questions & Answers

'tr' confusion

Good day, everyone! Could anybody explain me the following situation. If I'm running similar script: Var="anna.kurnikova" Var2="Anna Kurn" echo $Var | tr -t "$Var" "$Var2" Why the output is : anna KurniKova instead of Anna Kurnikova? :confused: Thank you in advance for any... (2 Replies)
Discussion started by: Nafanja
2 Replies

6. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

7. Shell Programming and Scripting

conditional confusion

Hell Unix.com Community: I am working on a personal project using yad v0.12.4 (zenity fork) and have hit a wall on how to show a progress bar while my function is processing. I have been all over the ABS Guide, googled 21 Linux-specific sites that I revere. I even asked on the yad-common... (4 Replies)
Discussion started by: Habitual
4 Replies

8. Shell Programming and Scripting

Stripping of a symbol from string not working properly

Hi All, I used this code to strip-off $-symbol from string values. a="$980" b="897" a=`echo "$a" | sed 's/$/ /g'` b=`echo "$b" | sed 's/$/ /g'` echo "$a" echo "$b" but this results in the output: 80 and 897 it works when i use a='$987' b='890' (13 Replies)
Discussion started by: angie1234
13 Replies

9. Shell Programming and Scripting

Confusion with PS

Hello All, I have a problem in counting number of process getting run with my current script name.. Here it is ps -ef | grep $0 | grep -v grep This display just one line with the PID, PPID and other details when i print it in the script. But when I want to count the numbers in my... (11 Replies)
Discussion started by: sathyaonnuix
11 Replies
REQUEST-KEY.CONF(5)					  Linux Key Management Utilities				       REQUEST-KEY.CONF(5)

NAME
request-key.conf - Instantiation handler configuration file DESCRIPTION
This file is used by the /sbin/request-key program to determine which program it should run to instantiate a key. request-key works scans through the file a line at a time until it finds a match, which it will then use. If it doesn't find a match, it'll return an error and the kernel will automatically negate the key. Any blank line or line beginning with a hash mark '#' is considered to be a comment and ignored. All other lines are assumed to be command lines with a number of white space separated fields: <op> <type> <description> <callout-info> <prog> <arg1> <arg2> ... The first four fields are used to match the parameters passed to request-key by the kernel. op is the operation type; currently the only supported operation is "create". type, description and callout-info match the three parameters passed to keyctl request2 or the request_key() system call. Each of these may contain one or more asterisk '*' characters as wildcards anywhere within the string. Should a match be made, the program specified by <prog> will be exec'd. This must have a fully qualified path name. argv[0] will be set from the part of the program name that follows the last slash '/' character. If the program name is prefixed with a pipe bar character '|', then the program will be forked and exec'd attached to three pipes. The callout information will be piped to it on it's stdin and the intended payload data will be retrieved from its stdout. Anything sent to stderr will be posted in syslog. If the program exits 0, then /sbin/request-key will attempt to instantiate the key with the data read from stdout. If it fails in any other way, then request-key will attempt to execute the appropriate 'negate' operation command. The program arguments can be substituted with various macros. Only complete argument substitution is supported - macro substitutions can't be embedded. All macros begin with a percent character '%'. An argument beginning with two percent characters will have one of them dis- carded. The following macros are supported: %o Operation type %k Key ID %t Key type %d Key description %c Callout information %u Key UID %g Key GID %T Requestor's thread keyring %P Requestor's process keyring %S Requestor's session keyring There's another macro substitution too that permits the interpolation of the contents of a key: %{<type>:<description>} This performs a lookup for a key of the given type and description on the requestor's keyrings, and if found, substitutes the contents for the macro. If not found an error will be logged and the key under construction will be negated. EXAMPLE
A basic file will be installed in the /etc. This will contain two debugging lines that can be used to test the installation: create user debug:* negate /bin/keyctl negate %k 30 %S create user debug:loop:* * |/bin/cat create user debug:* * /usr/share/keyutils/request-key-debug.sh %k %d %c %S negate * * * /bin/keyctl negate %k 30 %S This is set up so that something like: keyctl request2 user debug:xxxx negate will create a negative user-defined key, something like: keyctl request2 user debug:yyyy spoon will create an instantiated user-defined key with "Debug spoon" as the payload, and something like: keyctl request2 user debug:loop:zzzz abcdefghijkl will create an instantiated user-defined key with the callout information as the payload. FILES
/etc/request-key.conf SEE ALSO
keyctl(1), request-key.conf(5) Linux 11 July 2005 REQUEST-KEY.CONF(5)
All times are GMT -4. The time now is 09:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy