03-16-2009
Thanks for the solution
Hi Krishmath...
Thanks for the soultion. Result as expected except with two things...
1. All parameter are creating with space (i can say "with new line") after the $record value such as borrower_parameter_B200103
.prm
2. It is not reading the last record of the file and not creating the parameter for that.
Content of the newly created files are really good. Can you please provide the solution for these two...
Thanks for your help!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I'm a newbie in shell script.
So, i would like to create a shell script which take 2 IN parameters (PARAM1 and PARAM2).
This script need to create 2 files as :
I need to create this file /etc/apache2/sites-available/PARAM2 :
<VirtualHost *:80>
DocumentRoot "/home/PARAM1/www"... (0 Replies)
Discussion started by: chatlumo
0 Replies
2. UNIX for Advanced & Expert Users
Hey everyone.
I am trying to figure out a way to create a file that will be renamed based off of one of multiple files. For example, if I have 3 files (cat.ctl, dog.ctl, and bird.ctl) that gets placed on to an ftp site I want to create a single file called new.cat.ctl, new.dog.ctl, etc for each... (3 Replies)
Discussion started by: coach5779
3 Replies
3. Shell Programming and Scripting
Hi All,
I have a file which looks like this:
234422 1 .00222
323232 1 3232
32323 1 0.00222
1234 2 1211
2332 2 0.9
233 3 0.883
123 3 45
As you can see, the second column of the file is already sorted which I did using sort command.
Now, I want to create files based on the second... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
4. UNIX for Dummies Questions & Answers
I have more than 10K songs in two directories on a hard drive. I would like to create a file list all of files name then change to .xml extension to upload to iPhone so I have a Karaoke list on my iPhone.
I need your help to create a file by using command in Linux.
Files names:
0001 More... (4 Replies)
Discussion started by: ggcc
4 Replies
5. Shell Programming and Scripting
Hii
I have these files , and I want to merge them in an excel file
each file have two columns
file1
title1
1 1
2 2
3 3
file2
title2
5 5
6 6
7 7
8 8
9 9 (10 Replies)
Discussion started by: maryre89
10 Replies
6. Shell Programming and Scripting
Hello Guys.
Please I would like to create empty files from a list
In file1 will be the followin values, so i will like to create for each name a empty file.
file1
2191off-r0.sps
2192off-r0.sps
2193off-r0.sps
2194off-r0.sps
2195off-r0.sps
So I need to get 5 empty files.
Thanks for... (7 Replies)
Discussion started by: jiam912
7 Replies
7. Shell Programming and Scripting
Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison.
Thanks in advance for your help.
File A
A,B,C,45,46... (2 Replies)
Discussion started by: ady_koolz
2 Replies
8. Shell Programming and Scripting
Hello ,
Can anyone please help me to solve the below -
Input.txt
source table abc
col1 char
col2 number
source table bcd
col1 date
col2 char
output should be 2 files based on the row separator "source table"
abc.txt
col1 char (6 Replies)
Discussion started by: Pratik4891
6 Replies
9. Shell Programming and Scripting
Hi All,
I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them
abc.sh
----------
export Numbr_Parms=$#
export a=1
while
do
export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
10. UNIX for Beginners Questions & Answers
I have looked through several threads regarding merging files with awk and attempted using join however have been unsuccessful likely as I do not fully understand awk.
What I am attempting is to take a csv file which could be between 1 and 15,000 lines with 5 colums and another csv file that will... (4 Replies)
Discussion started by: cdubu2
4 Replies
LEARN ABOUT CENTOS
cap_copy_ext
CAP_COPY_EXT(3) Linux Programmer's Manual CAP_COPY_EXT(3)
NAME
cap_copy_ext, cap_size, cap_copy_int - capability state external representation translation
SYNOPSIS
#include <sys/capability.h>
ssize_t cap_size(cap_t cap_p);
ssize_t cap_copy_ext(void *ext_p, cap_t cap_p, ssize_t size);
cap_t cap_copy_int(const void *ext_p);
Link with -lcap.
DESCRIPTION
These functions translate between internal and external representations of a capability state. The external representation is an
exportable, contiguous, persistent representation of a capability state in user-managed space. The internal representation is managed by
the capability functions in working storage.
cap_size() returns the total length (in bytes) that the capability state in working storage identified by cap_p would require when con-
verted by cap_copy_ext(). This function is used primarily to determine the amount of buffer space that must be provided to the
cap_copy_ext() function in order to hold the capability data record created from cap_p.
cap_copy_ext() copies a capability state in working storage, identified by cap_p, from system managed space to user-managed space (pointed
to by ext_p) and returns the length of the resulting data record. The size parameter represents the maximum size, in bytes, of the result-
ing data record. The cap_copy_ext() function will do any conversions necessary to convert the capability state from the undefined internal
format to an exportable, contiguous, persistent data record. It is the responsibility of the user to allocate a buffer large enough to
hold the copied data. The buffer length required to hold the copied data may be obtained by a call to the cap_size() function.
cap_copy_int() copies a capability state from a capability data record in user-managed space to a new capability state in working storage,
allocating any memory necessary, and returning a pointer to the newly created capability state. The function initializes the capability
state and then copies the capability state from the record pointed to by ext_p into the capability state, converting, if necessary, the
data from a contiguous, persistent format to an undefined, internal format. Once copied into internal format, the object can be manipu-
lated by the capability state manipulation functions (see cap_clear(3)). Note that the record pointed to by ext_p must have been obtained
from a previous, successful call to cap_copy_ext() for this function to work successfully. The caller should free any releasable memory,
when the capability state in working storage is no longer required, by calling cap_free() with the cap_t as an argument.
RETURN VALUE
cap_size() returns the length required to hold a capability data record on success, and -1 on failure.
cap_copy_ext() returns the number of bytes placed in the user managed space pointed to by ext_p on success, and -1 on failure.
cap_copy_int() returns a pointer to the newly created capability state in working storage on success, and NULL on failure.
On failure, errno is set to EINVAL, ENOMEM, or ERANGE.
CONFORMING TO
These functions are specified in the withdrawn POSIX.1e draft specification.
SEE ALSO
libcap(3), cap_clear(3), cap_from_text(3), cap_get_file(3), cap_get_proc(3), cap_init(3), capabilities(7)
2008-05-11 CAP_COPY_EXT(3)