Sponsored Content
Full Discussion: sed s/// syntax help
Top Forums Shell Programming and Scripting sed s/// syntax help Post 302494509 by dba_frog on Monday 7th of February 2011 01:11:23 PM
Old 02-07-2011
I'm not kidding. It doesn't want to work. Other sed cmds are working.
I ran the cmd against the file and the output was still the same as the original. See attached JPG
sed s/// syntax help-sed_issuejpg
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed syntax

Hi, How can i use sed command to modify a part of a variable containing "/" by another containing "/" like describe below: VAR="/app/share/eai" VAR1="/app/share" VAR2="/data/test" echo $VAR | sed 's/... ??? # using sed to replace $VAR1 in $VAR by $VAR2 ? (4 Replies)
Discussion started by: jo_aze
4 Replies

2. Shell Programming and Scripting

Help for Sed Syntax problem

I have one File named "txt_file" # cat txt_file <DBType>RT</DBType> <AppType>RT</AppType> -------------------------------------------------- I want replace "<AppType>RT</AppType>" to <AppType>XY</AppType> in txt_file and output redirect to Newfile ... (2 Replies)
Discussion started by: SanjayLinux
2 Replies

3. Shell Programming and Scripting

syntax for variables in sed

I always kind of wondered this but I have a variable that I want to use in a search and replace. Basically I want to search a file for the string in my variable and replace it with something fixed but I'm unsure of the variable rule in sed. Here's generally what I have: sed 's/$name/newname/g'... (15 Replies)
Discussion started by: eltinator
15 Replies

4. Shell Programming and Scripting

What syntax to use with sed c\

I know that I want to entirely replace line 3 in my file filename.txt. I have tried all sorts of variations of sed 3,3,c\replacement stuff\ filename.txt with no success. about the only thing that causes any reaction is sed 3,3c\\ filename.txt but it just prints out the whole file. ... (13 Replies)
Discussion started by: SusanDAC
13 Replies

5. Shell Programming and Scripting

Obscure sed extraction syntax

Hi, Could anyone clearly explain me the below sed construct in detail to get to know what it actually does? sed 's/\(* *\)//4' echo 'test;10;20' | sed 's/*;\(*\)/\1/' (1 Reply)
Discussion started by: royalibrahim
1 Replies

6. Shell Programming and Scripting

Explain following sed syntax please

Thanks to this forum I have managed to work out a solution to my problem and actually understand most of it, but one thing is confusing me and I am sure someone here can explain. I need to insert a piece of txt into a file. This txt is awk '{ sub(/$/,"\r"); print }' $JCL_WBB50103_EFTOUT >... (2 Replies)
Discussion started by: hukcjv
2 Replies

7. UNIX for Dummies Questions & Answers

sed - need help for syntax

Hello, here is what I've got : FILE='/OPERATIONNEL/SATURNE/CHAMPS/MASTER/ANA/SATURNE_1DAV_20080805_20080806_S3D_T_R20080806.NC ';;... (4 Replies)
Discussion started by: Aswex
4 Replies

8. Shell Programming and Scripting

sed syntax error

Hi, In the following excerpt of shell script code: I could not understand the sed syntax. Could anyone shed some light on this? configure_ssl() { jboss_conf_file=$1 echo "Configuring SSL for -" ${jboss_conf_file} isSSLSetup=`echo cat ${jboss_conf_file} | grep <Connector... (2 Replies)
Discussion started by: royalibrahim
2 Replies

9. Shell Programming and Scripting

Another sed Syntax Puzzle . . .

Greetings! Have a quick question for the community today; this time looking at a nifty little sed puzzle ;) Consider the following file content to be worked through:What needs to happen is theblock should be removed up to and including the following blank line, leavingI have bits and pieces... (8 Replies)
Discussion started by: LinQ
8 Replies

10. UNIX for Dummies Questions & Answers

Can sed use a file on the syntax?

Dear all, I need help, again. I would like to use a sed on a for. Is is possible to ask sed to call a file in the syntax? For exemple: sed "/Y/ s/number/X/" test_imput > test_output where Y is a file which inside there is one pattern only; Also X is a file with one... (6 Replies)
Discussion started by: lColli
6 Replies
CAP_IOCTLS_LIMIT(2)					      BSD System Calls Manual					       CAP_IOCTLS_LIMIT(2)

NAME
cap_ioctls_limit, cap_ioctls_get -- manage allowed ioctl commands LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/capsicum.h> int cap_ioctls_limit(int fd, const unsigned long *cmds, size_t ncmds); ssize_t cap_ioctls_get(int fd, unsigned long *cmds, size_t maxcmds); DESCRIPTION
If a file descriptor is granted the CAP_IOCTL capability right, the list of allowed ioctl(2) commands can be selectively reduced (but never expanded) with the cap_ioctls_limit() system call. The cmds argument is an array of ioctl(2) commands and the ncmds argument specifies the number of elements in the array. There can be up to 256 elements in the array. The list of allowed ioctl commands for a given file descriptor can be obtained with the cap_ioctls_get() system call. The cmds argument points at memory that can hold up to maxcmds values. The function populates the provided buffer with up to maxcmds elements, but always returns the total number of ioctl commands allowed for the given file descriptor. The total number of ioctls commands for the given file descriptor can be obtained by passing NULL as the cmds argument and 0 as the maxcmds argument. If all ioctl commands are allowed (CAP_IOCTL capability right is assigned to the file descriptor and the cap_ioctls_limit() system call was never called for this file descriptor), the cap_ioctls_get() system call will return CAP_IOCTLS_ALL and won't modify the buffer pointed to by the cmds argument. RETURN VALUES
The cap_ioctls_limit() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. The cap_ioctls_get() function, if successful, returns the total number of allowed ioctl commands or the value CAP_IOCTLS_ALL if all ioctls commands are allowed. On failure the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
cap_ioctls_limit() succeeds unless: [EBADF] The fd argument is not a valid descriptor. [EFAULT] The cmds argument points at an invalid address. [EINVAL] The ncmds argument is greater than 256. [ENOTCAPABLE] cmds would expand the list of allowed ioctl(2) commands. cap_ioctls_get() succeeds unless: [EBADF] The fd argument is not a valid descriptor. [EFAULT] The cmds argument points at invalid address. SEE ALSO
cap_fcntls_limit(2), cap_rights_limit(2), ioctl(2) HISTORY
Support for capabilities and capabilities mode was developed as part of the TrustedBSD Project. AUTHORS
This function was created by Pawel Jakub Dawidek <pawel@dawidek.net> under sponsorship of the FreeBSD Foundation. BSD
March 27, 2014 BSD
All times are GMT -4. The time now is 01:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy