01-12-2002
Try ...
sed "s/oldpass/newpass/g" userfile > userfile.new
mv userfile userfile.old
mv userfile.new userfile
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
i log into an xterm with bash shell but the character size of the xterm shell is too small.
how can i enlarge the size of text on this xterm bash shell? (3 Replies)
Discussion started by: armen
3 Replies
2. UNIX for Dummies Questions & Answers
I have a text
"abc def ghi"
and I want to get it as
"def abc ghi"
I am using this
echo "abc def ghi" | sed 's/\(*\)\(*\)/\2\1/'
But I am not able to get the output, could anyone help me.
Thanks (9 Replies)
Discussion started by: venu_nbk
9 Replies
3. Shell Programming and Scripting
I have a text file with a bunch of ethernet port names and host names. I need to just change the last 2 chars on each line to a new number how can I do this quickly?
from
ethernet5/35 Net01
ethernet5/36 Net01
ethernet5/37 Net01
ethernet5/38 Net01
to
ethernet5/35 Net02
ethernet5/36... (4 Replies)
Discussion started by: kingdbag
4 Replies
4. Shell Programming and Scripting
hello
I have this:
sed -e "s/install_location=....../g" -e "s/hostname=....../g" -e "s/server_name=....../y" input.txt
it will display on the screen what have changed. however I want to change file input.txt. Any idea other than doing redirection (>)
thx (2 Replies)
Discussion started by: melanie_pfefer
2 Replies
5. Shell Programming and Scripting
i all,
I thought I would restructure my question.
Is there a way you can get rid of characters in a line if you know what number they are.
eg,
if this was a line
you could see there were 18 characters including spaces. Could I delete characters 4,5,6 and 7 to remove the word this. ... (2 Replies)
Discussion started by: outthere_3
2 Replies
6. Shell Programming and Scripting
I am doing a basic script to check if services are disabled, and I was wondering how to change to colours for PASS and FAIL to green & red respectively.
#!/usr/bin/bash
clear
TELNET=`svcs -a | grep telnet | awk '{print $1}'`
if
then
RESULT=PASS
else
RESULT=FAIL
fi... (3 Replies)
Discussion started by: detatchedd
3 Replies
7. Programming
I'm writing my own Unix ls command in c and I was wondering if anyone knows how to or can point me to a tutorial that shows me how to change the text color of the filename depending on if it's a directory, regular file, linked file, etc..., like the real ls command does? Thanks. (4 Replies)
Discussion started by: snag49ers
4 Replies
8. Shell Programming and Scripting
I have a file as below and want to change it using awk
I want to find the entries such as
Iteration No.788
Best Value 0.00408152
Next-Worst Value 0.00522935
Worst Value 0.00523487
and change it to
Iteration No.788
788. Best Value = 0.00408152
788. ... (8 Replies)
Discussion started by: kristinu
8 Replies
9. UNIX for Dummies Questions & Answers
I'm changing some html code on multiple web pages and I need to match particular phrases but keep some text within each phrase.
E.G. I need to change this line:
<DIV id="heading">Description:</DIV>
into
<span class="hlred">Description:</span><br />
The text "Description:" may... (2 Replies)
Discussion started by: hal8000
2 Replies
10. UNIX for Dummies Questions & Answers
Hello, I have a situation where I want to change a line of text in multiple files, but the problem is that I want to change the text to something unique for each file.
For example, let's say I have five files named bob.txt, joe.txt, john.txt, tom.txt, and zach.txt. Each of these files has a... (5 Replies)
Discussion started by: Scatterbrain26
5 Replies
LEARN ABOUT MOJAVE
sasl_setpass
sasl_setpass(3) SASL man pages sasl_setpass(3)
NAME
sasl_setpass - Check a plaintext password
SYNOPSIS
#include <sasl/sasl.h>
int sasl_setpass(sasl_conn_t *conn,
const char *user,
const char *pass, unsigned passlen,
const char *oldpass, unsigned oldpasslen,
unsigned flags)
DESCRIPTION
sasl_setpass will set passwords in the sasldb, and trigger the setpass callbacks for all available mechanisms.
user is the username to set the password for.
pass and passlen are the password to set and its length
oldpass and oldpasslen are the old password & its length (and are optional)
flags Are flags including SASL_SET_CREATE and SASL_SET_DISABLE (to cause the creating of nonexistent accounts and the disabling of an
account, respectively)
NOTES
oldpass and oldpasslen are unused in the Cyrus SASL implementation, though are passed on to any mechanisms that may require them.
RETURN VALUE
Returns SASL_OK on success. SASL error code on failure.
CONFORMING TO
RFC 4422
SEE ALSO
sasl(3), sasl_errors(3), sasl_checkpass(3)
SASL
10 July 2001 sasl_setpass(3)