04-20-2016
Hello Don,
Thank you for the brief explanation on the code. I have got a clear understanding now.
Thanks again for your time to look into this
Regards,
am24
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys,
say I have a few files in a directory (58 text files or somthing)
each one contains mulitple strings that I wish to replace with other strings
so in these 58 files I'm looking for say the following strings:
JAM (replace with BUTTER)
BREAD (replace with CRACKER)
SCOOP (replace... (19 Replies)
Discussion started by: rich@ardz
19 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'd like to process multiple files. For example:
file1.txt
file2.txt
file3.txt
Each file contains several lines of data. I want to extract a piece of data and output it to a new file.
file1.txt ----> newfile1.txt
file2.txt ----> newfile2.txt
file3.txt ----> newfile3.txt
Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies
4. Shell Programming and Scripting
Hi!
I'm new in awk and I need some help.
I have a folder with a lot of files and I need that awk do something in each file and print a new file with the output. The input file name should be modified when I print the outpu files.
Thanks in advance for help!
:-)
ciao (5 Replies)
Discussion started by: gabrysfe
5 Replies
5. Shell Programming and Scripting
Hi all,
I'll like to search a list of tems in a huge file and then output each of the terms to individual files. I know I can use grep -f list main.file to search them but how can I split the output into individual files? Thank you. (6 Replies)
Discussion started by: ivpz
6 Replies
6. Shell Programming and Scripting
I have a list of files all over a file system e.g.
/home/1/foo/bar.x
/www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g.
if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc.
There... (2 Replies)
Discussion started by: spacegoose
2 Replies
7. Shell Programming and Scripting
Hi, every one!
I have a file with multiple strings.
file1
ATQRGNE
ASQGVKFTE
ASSQYRDRGGLET
SPEQGARSDE
ASSRDFTDT
ASSYSGGYE
ASSYTRLWNTGE
ASQGHNTD
PSLGGGNQPQH
SLDRDSYNEQF
I want to grep each string in hundreds of files in the same directory, further, I want to find out the string... (7 Replies)
Discussion started by: xshang
7 Replies
8. Shell Programming and Scripting
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies
9. Post Here to Contact Site Administrators and Moderators
Hi All,
I am trying to redirect the grep output to multiple files, can you please help with that.
Below is the command im using to match my pattern
grep \<proxyType\>$PxyType $DIR/EndureFiles.json > File_Name*.json
Note : $DIR and $PxyType is already defined in my script
Im able... (0 Replies)
Discussion started by: Deena1984
0 Replies
10. Shell Programming and Scripting
I need to grep multiple strings from a particular file.
I found the use of egrep "String1|String2|String3" file.txt | wc-l
Now what I'm really after is that I need to separate word count per each string found. I am trying to keep it to use the grep only 1 time.
Can you guys help ?
... (9 Replies)
Discussion started by: nms
9 Replies
LEARN ABOUT DEBIAN
explain_calloc_or_die
explain_calloc_or_die(3) Library Functions Manual explain_calloc_or_die(3)
NAME
explain_calloc_or_die - Allocate and clear memory and report errors
SYNOPSIS
#include <libexplain/calloc.h>
void *explain_calloc_or_die(size_t nmemb, size_t size);
void *explain_calloc_on_error(size_t nmemb, size_t size);
DESCRIPTION
The explain_calloc_or_die function is used to call the calloc(3) system call. On failure an explanation will be printed to stderr, obtained
from the explain_calloc(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
The explain_calloc_on_error function is used to call the calloc(3) system call. On failure an explanation will be printed to stderr,
obtained from the explain_calloc(3) function, but still returns to the caller.
nmemb The nmemb, exactly as to be passed to the calloc(3) system call.
size The size, exactly as to be passed to the calloc(3) system call.
RETURN VALUE
The explain_calloc_or_die function only returns on success, see calloc(3) for more information. On failure, prints an explanation and
exits, it does not return.
The explain_calloc_on_error function always returns the value return by the wrapped calloc(3) system call.
EXAMPLE
The explain_calloc_or_die function is intended to be used in a fashion similar to the following example:
void *result = explain_calloc_or_die(nmemb, size);
SEE ALSO
calloc(3)
Allocate and clear memory
explain_calloc(3)
explain calloc(3) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2010 Peter Miller
explain_calloc_or_die(3)