Dear Elixir,
I tried in the same way.But it didn't work.Another thing that I suspect is original strings that I posted were like below :-
But actual strings that are coming are like below:-
I suspect about special character "_"(underscore) that comes in string.
Do we need to make any change in sed command to handle this ?
Hi Everyone!
I am trying to extract records between date makers in a log file. My selection string doesn't work, though. Please help.
This test works, if I manually enter the two date-strings (output=28 lines):
# sed -n '/\/,/\/p' ./access_log
But if the date string is a variable, it will... (2 Replies)
I have read many threads, but I still didn't find the right answer. May be i didn't find the right thread, though are so many threads for the same question.
Basically the situation is - find date in a file and replace it with another date. (its not homework, its part of lot of a big processing,... (10 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
I have list of data I have cut down to format:
I am using sed command to remove the sed 's/
Returns error:
sed: -e expression #1, char 5: unterminated `s' command
Full code line is:
cat textFile | cut -d ' ' -f 4 | cut ':' -f 1 | sed 's/
Thanks,
Please use next time code tags... (2 Replies)
Greetings..
getting the error while execution of the script, correct where i am missing
#!/bin/bash
DATE=`date +%Y-%m-%d:::%H:%M`
HOSTNAME=`hostname`
TXT="/log/temp.txt"
LOGPATH="/log1/commanlogs/"
IP=`/sbin/ifconfig | grep -i inet| head -n1| awk '{print $2}'| awk -F : '{print $2}'`... (7 Replies)
Hello All,
I am running source command on my project configuration file app.cfg which has conditional statements with make file systax E.g ifeq ($(APP_CMP_DIR),trunk).
When I source this file it throws error: syntax error near unexpected token... (1 Reply)
I am trying to grep for a particular text (Do action on cell BL330) in a text file(sample.gz) which is searched in the content filtered by date+timestamp (2016-09-14 01:09:56,796 to 2016-09-15 04:10:29,719) on a remote machine and finally write the output into a output file on a local machine.
... (23 Replies)
I am trying to use the below sed command to replace all "|" to ^, in a folder had 50 dat files. when i tried with 1 file it worked but when i tried with wild card, is not working.
sed -i 's/"|"/\^/g' *.dat
Is this the proper way to use sed command thank you very much for help. (3 Replies)
I am trying to add word in last of particular line.
the same command syntex is running on prompt. but in bash script give error."sed: -e expression #1, char 20: unterminated address regex"
Please help.
for i in `cat servername`;
do
ssh -q -t root@$i sed -i '/simple_allow_groups =/s/$/,... (4 Replies)
Discussion started by: yash_message
4 Replies
LEARN ABOUT NETBSD
gelf_getrel
GELF_GETREL(3) BSD Library Functions Manual GELF_GETREL(3)NAME
gelf_getrel, gelf_update_rel -- read and update ELF relocation entries
LIBRARY
ELF Access Library (libelf, -lelf)
SYNOPSIS
#include <gelf.h>
GElf_Rel *
gelf_getrel(Elf_Data *data, int ndx, GElf_Rel *rel);
int
gelf_update_rel(Elf_Data *data, int ndx, GElf_Rel *rel);
DESCRIPTION
These convenience functions are used to retrieve and update class-dependent Elf32_Rel or Elf64_Rel structures in an ELF object.
Argument data is an Elf_Data descriptor associated with a section of type SHT_REL. Argument ndx is the index of the entry being retrieved or
updated. The class-independent GElf_Rel structure is described in gelf(3).
Function gelf_getrel() retrieves the class-dependent entry at index ndx in data buffer data and copies it to the destination pointed to by
argument rel after translation to class-independent form.
Function gelf_update_rel() converts the class-independent entry pointed to by argument rel to class-dependent form, and writes it to the
entry at index ndx in the data buffer described by argument data. Function gelf_update_rel() signals an error if any of the values in the
class-independent representation exceeds the representable limits of the target type.
RETURN VALUES
Function gelf_getrel() returns the value of argument rel if successful, or NULL in case of an error. Function gelf_update_rel() returns a
non-zero value if successful, or zero in case of an error.
ERRORS
These functions may fail with the following errors:
[ELF_E_ARGUMENT] Arguments data or rel were NULL.
[ELF_E_ARGUMENT] Argument ndx was less than zero or larger than the number of entries in the data descriptor.
[ELF_E_ARGUMENT] Data descriptor data was not associated with a section of type SHT_REL.
[ELF_E_RANGE] A value was not representable in the target type.
SEE ALSO elf(3), elf_getdata(3), elf_getscn(3), gelf(3)BSD August 29, 2006 BSD