Sponsored Content
Top Forums Shell Programming and Scripting Found and Notfound compare two file Post 303012600 by ranjancom2000 on Tuesday 6th of February 2018 01:06:01 PM
Old 02-06-2018
thanks it was working has some space
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies

2. UNIX for Dummies Questions & Answers

12. If an ‘88’ Record with BAI Code ‘902’ was found on input file and not written to Output file, re

This is my input file like this 03,105581,,015,+00000416418,,,901,+00000000148,,,922,+00000000354,,/ 49,+00000000000416920,00002/ 03,5313236,,015,+00231036992,,,045,+00231036992,,,901,+00000048428,,/ 88,100,+0000000000000,0000000,,400,+0000000000000,0000000,/ 88,902,+0000000079077,,/... (0 Replies)
Discussion started by: sgoud
0 Replies

3. Shell Programming and Scripting

Delete a pattern present in file 2 from file 1 if found in file 1.

I have two files File1 ==== 1|2000-00-00|2010-02-02|| 2| 00:00:00|2012-02-24|| 3|2000-00-00|2011-02-02|| File2 ==== 2000-00-00 00:00:00 I want the delete the patterns which are found in file 2 from file 1, Expected output: File1 ==== (5 Replies)
Discussion started by: machomaddy
5 Replies

4. Shell Programming and Scripting

Search for file, give error if more than one file is found

Want to write a function that prints an error when passed a list of file names. If the file list is empty, print error "no file found", if there are more than one file, print "error more than one file found" (22 Replies)
Discussion started by: kristinu
22 Replies

5. Shell Programming and Scripting

Modify a file by another file: add new line and variable after string is found

hello, I have problem with writing/adjusting a shell script. I searched forum and unfortunately couldn't write scipt based on the information I found. I never wtire such so it's hard for me and I do need to modify one script immediately. case looks like: 1. 'file' that needs to be modified... (3 Replies)
Discussion started by: bipbip
3 Replies

6. UNIX for Dummies Questions & Answers

look for specific values in a file and rename file with value found

Hi, i have a file with some data ..look for some specific value in the file and if found that value rename the file with the value found in the file.. ex.. File.txt 1236 43715825601ANDERSSON, 1236 437158256031963040120060901200609010000000 1236 43715825604123 MCCL AVE UPPER 1236 ... (11 Replies)
Discussion started by: dssyadav
11 Replies

7. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

8. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

9. Shell Programming and Scripting

While loop a file containing list of file names until the files are found?

Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies

10. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
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); USAGE
cc ... -lcap DESCRIPTION
These functions translate a capability state from an internal representation into an external one. 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 converted 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 func- tion 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 resulting data record. The cap_copy_ext function will do any conversions necessary to convert the capability state from the undefined internal for- mat 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 painted 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. 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(3) is set to EINVAL, ENOMEM, or ERANGE. CONFORMING TO
These functions are specified by POSIX.1e. SEE ALSO
cap_clear(3), cap_from_text(3), cap_get_file(3), cap_get_proc(3), cap_init(3) 26th May 1997 CAP_COPY_EXT(3)
All times are GMT -4. The time now is 05:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy