Sponsored Content
Full Discussion: Sed variables
Top Forums Shell Programming and Scripting Sed variables Post 302243554 by era on Monday 6th of October 2008 03:23:44 AM
Old 10-06-2008
You're missing a terminating slash after $A
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

doing a sed with variables

Hi, I'm trying to do the following , I have certain variables in a file and then I want to check for these variables in a certain cobol file to see if they contain a certain package if so replace them with value 1 but but that last line is giving problems: # for each variable in SQL file ... (1 Reply)
Discussion started by: seaten
1 Replies

2. Shell Programming and Scripting

doing a sed with variables

Hi, I'm trying to do the following , I have certain variables in a file and then I want to check for these variables in a certain cobol file to see if they contain a certain package if so replace them with value 1 but but that last line is giving problems: # for each variable in SQL file ... (1 Reply)
Discussion started by: seaten
1 Replies

3. UNIX for Dummies Questions & Answers

doing a sed on certain variables

Hi guys, I want to replace certain values with the number 1. But it is also replacing other values which contain the value I want to replace. e.g.: I want to replace ID-INTERNAL with 1, that's no problem but it will also replace ID-INTERNAL-NON-REM with 1-NON-REM I don't want to... (10 Replies)
Discussion started by: seaten
10 Replies

4. Shell Programming and Scripting

variables in sed

when i do something like substituting a particular thing with a system variable, i am unable to do that expect the varible name getting into that. for ex.. i tried, sed -e 's/date/`date`/g' <if >of but i got date replaced with "`date`" and not with the actual date .. same case happened... (5 Replies)
Discussion started by: sskb
5 Replies

5. Shell Programming and Scripting

Using sed with variables (again!)

Hi, I'm trying to use sed to delete the last three lines of a file. I currently have: # get the amount of lines in the file foldernum=`wc -l File_In.txt | cut -c1-8` # remove the lines in the file sed "${foldernum}-3,${foldernum}d" File_In.txt > File_Out.txt I get the error - sed:... (5 Replies)
Discussion started by: Mr_Plow
5 Replies

6. Shell Programming and Scripting

using variables with sed

I'm trying to get sed to cut and replace using variables, but it doesnt seem to work, when I run this the mod time of the file does get updated. Is my syntax incorrect in the sed command? Thanks #!/usr/bin/ksh #Modify header set -x HEAD=$(cat PBN2CPR1.TXT | awk 'BEGIN { FS = ","... (1 Reply)
Discussion started by: ddurden7
1 Replies

7. UNIX for Dummies Questions & Answers

sed using variables

Hi, I am able to use sed if I hardcode the find and replace values in a shell script. This works: sed -e 's/123v/4567/g' /path/aaa.txt > /path/aaa.txt.tmp If I use a variable, I am not able to use sed command. why? This doesnot work: i=abc j=bk${i} sed -e 's/${i}/${j}/g'... (5 Replies)
Discussion started by: new_learner
5 Replies

8. Shell Programming and Scripting

variables and sed

Is it possible to place a variable in a sed command as such? sed 's/ret_Priv()/$var/' <filename> I am doing this under Bourne. (5 Replies)
Discussion started by: plslakewood
5 Replies

9. Shell Programming and Scripting

Using Variables with SED

All I am trying to produce the following in /etc/ssh/sshd_config, # IPv4 only #ListenAddress 0.0.0.0 # IPv4 & IPv6 ListenAddress :: to # IPv4 only ListenAddress <user-entry> ListenAddress <user-entry> # IPv4 & IPv6 #ListenAddress :: The number of user entries can vary. ... (1 Reply)
Discussion started by: miyoung999
1 Replies

10. Shell Programming and Scripting

sed with variables

Im trying to use sed to print value that matches the value in variable and all lines after that. grep "Something" test.txt | sed -e '/{$variable}/,$b' -e 'd' I cant get it work, if I replace the $variable with the value it contains, it works fine... (10 Replies)
Discussion started by: olkkis
10 Replies
elf_getarhdr(3ELF)					       ELF Library Functions						elf_getarhdr(3ELF)

NAME
elf_getarhdr - retrieve archive member header SYNOPSIS
cc [ flag ... ] file ... -lelf [ library... ] #include <libelf.h> Elf_Arhdr *elf_getarhdr(Elf *elf); DESCRIPTION
elf_getarhdr() returns a pointer to an archive member header, if one is available for the ELF descriptor elf. Otherwise, no archive member header exists, an error occurred, or elf was null; elf_getarhdr() then returns a null value. The header includes the following members. char *ar_name; time_t ar_date; uid_t ar_uid; gid_t ar_gid; mode_t ar_mode; off_t ar_size; char *ar_rawname; An archive member name, available through ar_name, is a null-terminated string, with the ar format control characters removed. The ar_raw- name member holds a null-terminated string that represents the original name bytes in the file, including the terminating slash and trail- ing blanks as specified in the archive format. In addition to ``regular'' archive members, the archive format defines some special members. All special member names begin with a slash (/), distinguishing them from regular members (whose names may not contain a slash). These special members have the names (ar_name) defined below. / This is the archive symbol table. If present, it will be the first archive member. A program may access the archive symbol table through elf_getarsym(). The information in the symbol table is useful for random archive processing (see elf_rand() on elf_begin(3ELF)). // This member, if present, holds a string table for long archive member names. An archive member's header contains a 16-byte area for the name, which may be exceeded in some file systems. The library automatically retrieves long member names from the string table, setting ar_name to the appropriate value. Under some error conditions, a member's name might not be available. Although this causes the library to set ar_name to a null pointer, the ar_rawname member will be set as usual. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
ar.h(3HEAD), elf(3ELF), elf_begin(3ELF), elf_getarsym(3ELF), libelf(3LIB), attributes(5) SunOS 5.10 11 Jul 2001 elf_getarhdr(3ELF)
All times are GMT -4. The time now is 09:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy