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)
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)
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)
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)
Hi guys,
Can u please help me to replace (-) with (/) in a file containing no of records using "sed " command in unix.
thanks in advance.
subhendu (5 Replies)
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)
I have a file with some numbers having single quotes around them which I want to remove.
i.e. '923930' -> 23930
If it can be done without using sed thats fine. I have tried with sed but can't think how to replace this pattern on only the numbers (13 Replies)
Hello,
I have two files. File1 is normal txt file and File2 contains list of line numbers.
e.g. File2:
3
6
9
.....
I need to replace a character in File1 in lines (taken from File2). For that I am using a "for" loop:
for i in $(cat File2)
do
sed "$i s/Y/N/" File1
done
but my... (3 Replies)
How can you use sed with a line of code that reads:
67899:Bill:Williams:Maple Dr.:45908600
Let us say we want to replace Maple Dr. with Oak St. (1 Reply)
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
LEARN ABOUT DEBIAN
nwbpset
NWBPSET(1) nwbpset NWBPSET(1)NAME
nwbpset - Create a bindery property or set its value
SYNOPSIS
nwbpset [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ]
DESCRIPTION
nwbpset Reads a property specification from the standard input and creates and sets the corresponding property. The format is determined by
the output of 'nwbpvalues -c'. nwbpset will hopefully become an important part of the bindery management suite of ncpfs, together with
'nwbpvalues -c'. See util/nwbpsecurity for an example.
As another example, look at the following command line:
nwbpvalues -t 1 -o supervisor -p user_defaults -c |
sed '2s/.*/ME/'|
sed '3s/.*/LOGIN_CONTROL/'|
nwbpset
With this command, the property user_defaults of the user object 'supervisor' is copied into the property login_control of the user object
'me'.
nwbpvalues -t 1 -o me -p login_control -c |
sed '9s/.*/ff/'|
nwbpset
This command disables the user object me.
Feel free to contribute other examples!
nwbpset looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information.
Please note that the access permissions of $HOME/.nwclient MUST be 600 for security reasons.
OPTIONS -h
-h is used to print out a short help text.
-S server
server is the name of the server you want to use.
-U user
user is the user name to use for login.
-P password
password is the password to use for login. If neither -n nor -P are given, and the user has no open connection to the server, nwbpset
prompts for a password.
-n
-n should be given if no password is required for the login.
-C
By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off
this conversion by -C.
AUTHORS
nwbpset was written by Volker Lendecke. See the Changes file of ncpfs for other contributors.
nwbpset 8/7/1996 NWBPSET(1)