08-12-2015
Sir,
I have added the same
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I know we can substitute a string using sed but how?
For example: sed 's/(old variable)/(new variable)/ details.dat
Am I suppose to put $old variable or whatever? Because I tried many times, it didnt work by putting $old variable. Am I suppose to enclose it with "" or ''?
Please help (3 Replies)
Discussion started by: Ohji
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a set of files containing strings like I.TEST1_TEST2 or B.ESSA_ESSB for example.
Does somebody know how to substitute these strings whith the same name and an extension "_V1" (ie. I.TEST1_TEST2_V1) using sed command or else ? (3 Replies)
Discussion started by: jo_aze
3 Replies
3. Shell Programming and Scripting
Hi ,
I am stuck up in the below scenario:-
I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression.
How can I use SED inside SHELL Scripting and command prompt as... (2 Replies)
Discussion started by: shubhranshu
2 Replies
4. Shell Programming and Scripting
Hi ,
I am stuck up in the below scenario:-
I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression.
How can I use SED inside SHELL Scripting and command prompt as well to... (1 Reply)
Discussion started by: shubhranshu
1 Replies
5. Shell Programming and Scripting
I have file.txt
1 4 7 9 3
I want to replace the tabs with a space, but my code doesn't work.
cat file.txt | sed 's/"\t"/ /g' > t.txt
But file is still the same. Numbers seperated by tabs instead of spaces.
Help? (2 Replies)
Discussion started by: Bandit390
2 Replies
6. Shell Programming and Scripting
Hi I am trying to do a text insertion in a text file at a particular line number in a shell script. However its not working.
sed '122i\
> for j in \`echo $MyList\` ; do perl -pi -e\'s#01\/01\/2009#01\/01\/2011#\' $j ; done' $HOME/MyScript.ksh
The Actual line to be inserted at line 122... (5 Replies)
Discussion started by: som.nitk
5 Replies
7. AIX
Hi,
I would like to know if there is a command similar to scsimgr in HP-UX that
can help me change the algorithm and reserve_policy attributes of all luns presented to an AIX host.
Otherwise I would have to use,
chdev -l hdiskX -a algorithm=round_robin reserve_policy=no_reserve
in a... (1 Reply)
Discussion started by: kanna_geekworkz
1 Replies
8. UNIX for Dummies Questions & Answers
I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename?
#!/bin/bash
filename=`echo $0`
/usr/bin/sed '/#include/ {
i\
the filename is `$filename`
}' $1
exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies
9. Shell Programming and Scripting
Hi everyone,
I need very simple sed command to change a parameter in a text file.
I have a line in this text which is like
set xx 0.5
A program reads this file and does some algebraic calculations. So to make a parameter scan I need to change the value of xx. I thought I can do... (7 Replies)
Discussion started by: hayreter
7 Replies
10. Shell Programming and Scripting
Hi,
I am trying to substitute an attributes value using sed command but it is only possible to substitute the value without space.
input xml
<BillingAddress11300000 Tag="11300000" SectionID="BLA" CustAddrName="CLAUDIA LUCIA DE ALMEIDA" CustAddrStreet="AV ENGENHEIRO RICHARD" CustAddrState="RJ"... (3 Replies)
Discussion started by: Bijayan Sarkar
3 Replies
LEARN ABOUT SUSE
sync_members
SYNC_MEMBERS(8) System Manager's Manual SYNC_MEMBERS(8)
NAME
sync_members - Synchronize a mailing list's membership with a flat file.
SYNOPSIS
sync_members [options] -f file listname
DESCRIPTION
This script is useful if you have a Mailman mailing list and a sendmail :include: style list of addresses (also as is used in Majordomo).
For every address in the file that does not appear in the mailing list, the address is added. For every address in the mailing list that
does not appear in the file, the address is removed. Other options control what happens when an address is added or removed.
OPTIONS
-n, --no-change
Don't actually make the changes. Instead, print out what would be done to the list.
-w={ yes | no }, --welcome-msg={ yes | no }
Sets whether or not to send the newly added members a welcome message, overriding whatever the list's `send_welcome_msg' setting is.
With -w=yes or -w, the welcome message is sent. With -w=no, no message is sent.
-d={ yes | no }, --digest={ yes | no }
Selects whether to make newly added members receive messages in digests. With -d=yes or -d, they become digest members. With -d=no
(or if no -d option given) they are added as regular members.
-a={ yes | no }, --notifyadmin={ yes | no }
Specifies whether the admin should be notified for each subscription or unsubscription. If you're adding a lot of addresses, you
definitely want to turn this off! With -a=yes or -a, the admin is notified. With -a=no, the admin is not notified. With no -a
option, the default for the list is used.
-f=filename, --file=filename
This option is required. It specifies the flat file to synchronize against. Email addresses must appear one per line. If filename
is `-' then stdin is used.
-h, --help
Print a small help text and exit
listname specifies the list to synchronize.
AUTHOR
Author of Mailman is the Mailman Cabal, see http://www.list.org/ for information. This manpage is written by Tollef Fog Heen
<tfheen@debian.org> for Debian
SEE ALSO
Mailman documentation on http://www.list.org/ and in /usr/share/doc/mailman.
2001-03-10 SYNC_MEMBERS(8)