02-21-2020
The need to create such an oddly named file is a little concerning. You would later on have to read it in a similarly convoluted way and your backup process may not like it either.
Can you elaborate why you think you need to create it like that? Other servers may not accept it as a valid file at all, so that may cause you other problems.
It would be helpful to be accurate with the ICODE tags too. At the moment, I'm not sure if you want to include te double-quotes or not, or if it even needs a leading space. I'm not wanting to berate you, just trying to get an accurate request so we can work on a suitable solution (or negate the need altogether)
Kind regards,
Robin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a data file with following structure:
a|b|c|d|3|f1|f2|f3
a|b|c|d|5|f1|f2|f3|f4|f5
I want to change this data to:
a|b|c|d|3|f1;f2;f3
a|b|c|d|5|f1;f2;f3;f4;f5
Data in column 5 tells the number of following fields. All fields delimiter after the 5th column needs to be... (6 Replies)
Discussion started by: sdubey
6 Replies
2. HP-UX
For counting the occurences of specific character in the file
I am issuing the command
grep -o 'character' filename | wc -w
It works in other shells but not in HP-UX as there is no option -o for grep.
What do I do now? (9 Replies)
Discussion started by: superprogrammer
9 Replies
3. Shell Programming and Scripting
I'm trying to count the number of 2 specific characters in a very large file. I'd like to avoid using gsub because its taking too long.
I was thinking something like:
awk '-F' { t += NF - 1 } END {print t}' infile > outfile
which isn't working
Any ideas would be great. (3 Replies)
Discussion started by: dcfargo
3 Replies
4. Shell Programming and Scripting
Hi,
I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this?
I tried to add it at 5th position using the below code. It didnt work. Please help!!!
awk '{substr($0,5,1) ~ /|/}{print}' $input_file > $temp_file (1 Reply)
Discussion started by: gpaulose
1 Replies
5. UNIX for Advanced & Expert Users
hi,
I want to store from 102 character to 128 character to a variable of header record which can be identified as 'HDR' which is the first 3 characters in the same line of a same.txt file.
Please advise.
Thanks (4 Replies)
Discussion started by: techmoris
4 Replies
6. Shell Programming and Scripting
i have a reqirement to adjust the data in a file based on a perticular character
the sample data is as below
483PDEAN CORRIGAN 52304037528955WAGES 50000
89BP ABCD MASTER352 5434604223735428 4200
58BP SOUTHERN WA848 ... (1 Reply)
Discussion started by: pema.yozer
1 Replies
7. UNIX Desktop Questions & Answers
Greetings Unix exports,
I am facing some problems in combining files with different name patterns with a directory and I would appreciate if you can help me
I have more than 1000 files but they follow a specific pattern of naming. e.g. 64Xtest01.txt
They are divided into two sets of test and... (9 Replies)
Discussion started by: A-V
9 Replies
8. Shell Programming and Scripting
This is a file that I have
test line 1 (55)
)
test line 2 (45)
)
I would like to change all the parens in position 1 of this file to a );
i only want to check position 1 in every line of the file. I have tried different varations of sed, but cannot seem to be able to limit it to... (1 Reply)
Discussion started by: JoeG
1 Replies
9. Shell Programming and Scripting
Hello guys,
I would need to remove the last character ")" of a specific line. This can be from any line. Your help is appreciated. Below is the line.
HOSTNAME=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP))
Please help. (6 Replies)
Discussion started by: sang8g
6 Replies
10. Shell Programming and Scripting
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT DEBIAN
request-key.conf
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)