Sponsored Content
Top Forums Shell Programming and Scripting Need help on shell script (sed) Post 302881172 by Don Cragun on Friday 27th of December 2013 02:12:48 AM
Old 12-27-2013
If both <dpath> and </dpath> are always on the same line, there is never more than one set of these tags on a single line, and the length of your longest input lines is no more than LINE_MAX bytes, the following should work:
Code:
sed 's/<dpath>.*<\/dpath>//' filename

The value of LINE_MAX on your system can be found using the command:
getconf LINE_MAX
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed command in shell script

I have a current code working(named subst1) having a user be able to type this line to substitute words using the sed command: subst1 old-pattern new-pattern filename Here is my shell script: #!/bin/bash # subst1 ARGS=3 E_BADARGS=65 if then echo "Usage: `basename $0`... (1 Reply)
Discussion started by: Todd88
1 Replies

2. Shell Programming and Scripting

shell script by sed

Hey everybody I need some help on how to order the data in file such as a file have first name last name and city and i would like to order them to in the same order by using sed thanks alot for your time (6 Replies)
Discussion started by: halola85
6 Replies

3. UNIX for Dummies Questions & Answers

shell script - sed

Hi i have a problem how to put som lines on top or in the bottom of the text with sed. problem is that i am reading from stdin and when i have som lines starting with ++, i have to put some characters on the top of the lines starting with that ++ example of input oooo ++abcd ++befg... (1 Reply)
Discussion started by: Dun
1 Replies

4. Shell Programming and Scripting

Help with shell script and sed!

Hi folks, maybe somebody here can help me. I have 2 files. File A and File B. File A contains URLs leading to files on the Internet, with one URL per line; The format of the URLs on each line in File A is . File B contains only the filenames from each line in File A; One filename per line. ... (11 Replies)
Discussion started by: o0110o
11 Replies

5. Shell Programming and Scripting

using sed in shell script

Hi all, I have files with the following names; afgcxa.pem4jan.rain.nc afgcxa.pem4feb.rain.nc afgcxa.pem4mar.rain.nc afgcxa.pem4apr.rain.nc I want to rename them to afgcxa.pem4-01.jan.rain.nc afgcxa.pem4-02.feb.rain.nc afgcxa.pem4-03.mar.rain.nc ... (5 Replies)
Discussion started by: Muhammad Rahiz
5 Replies

6. UNIX for Dummies Questions & Answers

Problems in shell script if sed is used

Hi All, Below is the script which i have written in cygwin: #!/usr/bin/sh fname=$1 cat $fname | sed 's/ //g' > fname1 for i in `cat $fname1` do echo $i > file1 #param1 is script name param1=`awk -F , '{print $1}' file1` param1="$param1.sql" #param2 is BL param2=`awk -F , '{print... (5 Replies)
Discussion started by: janardhanamk
5 Replies

7. Shell Programming and Scripting

using sed in shell script

Hi, i want to replace sub text which is in the middle of long text. let me be more clear with an example. Here is the actual text in the xml file <module-option name="principalDNSuffix">,cn=Users,dc=X,dc=Y</module-option> Now, in the above text, i want to replace all the content lying... (3 Replies)
Discussion started by: sunrexstar
3 Replies

8. Shell Programming and Scripting

SED shell script

Generate a ddl file, we have a flat file which contains many commands like REM, CREATE table, TRuncate etc This script should copy only create table statements to the ddl file. Create stmts can be in a single or multiple lines. ex:- INPUT FILE create table tbl1 (fld1,... (5 Replies)
Discussion started by: learninfo
5 Replies

9. Programming

Shell script using sed or awk

Hi, I want to read a file from the command line and remove all the spaces, tabs in it, replacing it with comma(,), and write it to a new file. can you help me out with this scenario. (1 Reply)
Discussion started by: sudhanshu12788
1 Replies

10. Homework & Coursework Questions

Asst: Shell Script to sed

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Generalize your sub2 script, producing a new script sub3 that will apply a substitution to any number of files... (16 Replies)
Discussion started by: raymondbn
16 Replies
ilogind(1M)															       ilogind(1M)

NAME
ilogind - Interface for libpam_dce.sl and libnss_dce.sl with DCE Description is an interface daemon for libpma_dce.sl (see pam_dce(5)),and libnss_dce.sl with DCE (/opt/dce/sbin/ilogind). starts up when integrated login is activated using the utility. See auth.adm(5). For the services in file that have libpam_dce.sl as the module to provide any of the authentication, account, management, session and pass- word services libpam_dce.sl sends the requests to which in turn interacts with DCE and services the requests. The results of these requests are returned to libpam_dce.sl. services the name service requests specified in If is one of the repository databases for passwd and/or group entries then, libnss_dce.sl services the corresponding name type requests (all calls to libnss_dce.sl sends the name type requests to which in turn calls the DCE reg- istry APIs to get them serviced and returns the result back to libnss_dce.sl A file named DEBUG can be created in the directory with the setuid bit set, for debugging purposes. So, if ilogind dumps core, it can be located in ENVIRONMENT VARIABLES
can be used to set the cache limit. The default value for this variable is 256. specifies the life of the password/group entry, which is 60 seconds. WARNING
In unix, for any calls, if the length of each line in /etc/group file exceeds the limit specified by LINE_MAX, it will return a NULL value. Refer group(4) for more details. However, DCE will return a valid entry with members upto the size specified by the return value of sysconf(_SC_GETGR_R_SIZE_MAX). This value is analogous to the LINE_MAX value. In case of file, the number of members in a group are lim- ited to 50. Members exceeding the count 50 will be discarded. Also, entries with duplicate group names are not supported in the override file. FILES
Configuration file for pluggable authentication modules Configuration file for the name-service switch AUTHOR
was developed by Hewlett Packard. SEE ALSO
auth.adm(5), pam_dce(5), pam.conf(4), getgrent(3C), getpwent(3C), groups(1), passwd(1) passwd_override(5) group_override(5) sysconf(2) HP DCE
ilogind(1M)
All times are GMT -4. The time now is 06:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy