Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
I need to search for a specific string in a file and if this string exist I need to replace it with something else. I am not sure how I could do this, using an if statement. (2 Replies)
Hi people. I am new to shell scripting, so I need a little help. I want to create a script named that takes an argument as a file, Read the input file and look for occurrences of the current username (say abc.xyz) who is executing the script. On finding an occurrence of the username take that line... (2 Replies)
Hi,
I am new to unix shell scripting.
I have a requirement.
Could anyone help me writing the script for the same?
Here goes the requirement:
I have a config file let's say temp.config.
Here is the data in the config file
temp.config :
-------------
name=victor
age=42
state=texas... (5 Replies)
Hi Guys...
I want to search for each file that contains a particular string.
e.g find . -print | xargs grep -i string_name
Now my issue is the files that I search in are gzipped.
Will I be able to find the string, using the above commands, even if the files are gzipped?
Please... (2 Replies)
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Hi,
I have a requirement where I need to replace a string in a line and this line will be identified by search criteria on previous line:
E.g.:
I have an xml file and Contents as below:
<Root>
<NameValue>
<name>Global/Text/Data</name>
<value>This is valid... (14 Replies)
Hello,
I have a file name like FIRST_DPF_DAILY_CUST_0826152322.txt
i need to extract the string after the third "_" underscore upto timestamp ends i.e CUST_0826152322
can anyone help me with the code
Thank you!
Regards
Srikanth Sagi (3 Replies)
Hi
I have a large txt file on my AIX server and I need to replace some text using two other files. So filename1 has about 500 lines similar to:
txtcode SYStem100
I have the string I want to change in string2 and the new stringname in string3. Does anyone know a way of doing this? I have... (1 Reply)
I am trying to read a value from a mapping file and would need to replace the value based on country parameter
source_table_@ctry_final
Expected
final_var=source_table_aus_final
If the country is in nz,usa,uk then
final_var=diff_table_nz_final
final_var=diff_table_usa_final
like that... (10 Replies)
Discussion started by: Master_Mind
10 Replies
LEARN ABOUT NETBSD
ssp
SSP(3) BSD Library Functions Manual SSP(3)NAME
ssp -- bounds checked libc functions
LIBRARY
Buffer Overflow Protection Library (libssp, -lssp)
SYNOPSIS
#include <ssp/stdio.h>
int
sprintf(char *str, const char *fmt, ...);
int
vsprintf(char *str, const char *fmt, va_list ap);
int
snprintf(char *str, size_t len, const char *fmt, ...);
int
vsnprintf(char *str, size_t len, const char *fmt, va_list ap);
char *
gets(char *str);
char *
fgets(char *str, int len, FILE *fp);
#include <ssp/string.h>
void *
memcpy(void *str, const void *ptr, size_t len);
void *
memmove(void *str, const void *ptr, size_t len);
void *
memset(void *str, int val, size_t len);
char *
strcpy(char *str, const char *ptr, size_t len);
char *
strcat(char *str, const char *ptr, size_t len);
char *
strncpy(char *str, const char *ptr, size_t len);
char *
strncat(char *str, const char *ptr, size_t len);
#include <ssp/strings.h>
void *
bcopy(const void *ptr, void *str, size_t len);
void *
bzero(void *str, size_t len);
#include <ssp/unistd.h>
ssize_t
read(int fd, void *str, size_t len);
int
readlink(const char * restrict path, char * restrict str, size_t len);
int
getcwd(char *str, size_t len);
DESCRIPTION
When _FORTIFY_SOURCE bounds checking is enabled as described below, the above functions get overwritten to use the __builtin_object_size(3)
function to compute the size of str, if known at compile time, and perform bounds check on it in order to avoid data buffer or stack buffer
overflows. If an overflow is detected, the routines will call abort(3).
To enable these function overrides the following should be added to the gcc(1) command line: ``-I/usr/include/ssp'' to override the standard
include files and ``-D_FORTIFY_SOURCE=1'' or ``-D_FORTIFY_SOURCE=2''.
If _FORTIFY_SOURCE is set to 1 the code will compute the maximum possible buffer size for str, and if set to 2 it will compute the minimum
buffer size.
SEE ALSO gcc(1), __builtin_object_size(3), stdio(3), string(3), security(7)HISTORY
The ssp library appeared NetBSD 4.0.
BSD March 21, 2011 BSD