Using the script: (Called replaceit)
#!/bin/ksh
String=$1
Replace=$2
sed -e "s/${orig}/${new}/g" oldfile.txt > newfile.txt
In oldfile.txt, I'm looking for: getenv("Work")
And change it To: /u/web
I execute the script:
replaceit "getenv(\""Work\"")" /u/web
I'm getting sed... (3 Replies)
how to escape / (forward slash) in a string.
I have following scnerio:
sed s/${var1}{$var2}
var1 and var2 both contain slashes, but sed gives error if there is a slash in var1 or var2. sed is used here to replace var1 with var2.
Thanks in advance (1 Reply)
Hi all,
I need to know way of inserting backward slash before forward slash. My problem is that i need to supply directory path as an argument while invoking cshell script. This argument is further used in script (i.e. sed is used to insert this path in some file). So i need to place \ in front... (2 Replies)
What is the significance of the forward slash(/) while specifying a directory?
cp -av /dir/ /opt/
and
cp -av /dir /opt
Does effectively the same job it seems? (2 Replies)
i need to replace '/' forward slash with \/(backward slash follwed by a forward slash) using sed command when the forward slash occurs as a first character in a file..
Tried something like this but doesn't seem to work.
find $1 -print0 | xargs -0 sed -i -e 's/^\//\\\//g'
Can someone... (19 Replies)
hi
hope somebody can help, there seems to be bit on the net about this, but still cant make it work the way i need.
i have a file live this
mm dd ff /dev/name1
mm dd ff /dev/name2
mm dd ff /dev/name3
mm dd ff /dev/name4
i need to update /dev/name1 etc to /newdev/new/name1 etc
so... (5 Replies)
Hi,
I have a tab delimited file "test.txt" like this:
id1 342 C/T
id2 7453 T/A/-/G/C
id3 531 T/C
id4 756 A/T/G
id5 23 A/G
id6 717 T/A/C
id7 718 C/T/A
And so on, with the possible choices for letters being A,C,T,G.
I would like to exclude from my file all the lines that do not have... (3 Replies)
I have some directories I am trying to sort. When I attempt to sort them and they are in this format, everything works great:
file
/vol/trees10
/vol/trees2
/vol/trees7
cat file |sort -ts -k2 -n
/vol/trees2
/vol/trees7
/vol/trees10
This makes thefiles in the order... (9 Replies)
I have a file abc.txt which has records like
456 /home/fgg/abdc.txt
3567 /home/fdss/vfgb.txt
23 /home/asd/dfght.txt
I WANT TO REMOVE STRING UNTIL 3RD OCCURANCE OF FORWARD SLASH
Output should be like
abdc.txt
vfgb.txt
dfght.txt (5 Replies)
Discussion started by: himanshupant
5 Replies
LEARN ABOUT PLAN9
ssl_set_fd
SSL_set_fd(3SSL) OpenSSL SSL_set_fd(3SSL)NAME
SSL_set_fd - connect the SSL object with a file descriptor
SYNOPSIS
#include <openssl/ssl.h>
int SSL_set_fd(SSL *ssl, int fd);
int SSL_set_rfd(SSL *ssl, int fd);
int SSL_set_wfd(SSL *ssl, int fd);
DESCRIPTION
SSL_set_fd() sets the file descriptor fd as the input/output facility for the TLS/SSL (encrypted) side of ssl. fd will typically be the
socket file descriptor of a network connection.
When performing the operation, a socket BIO is automatically created to interface between the ssl and fd. The BIO and hence the SSL engine
inherit the behaviour of fd. If fd is non-blocking, the ssl will also have non-blocking behaviour.
If there was already a BIO connected to ssl, BIO_free() will be called (for both the reading and writing side, if different).
SSL_set_rfd() and SSL_set_wfd() perform the respective action, but only for the read channel or the write channel, which can be set
independently.
RETURN VALUES
The following return values can occur:
0 The operation failed. Check the error stack to find out why.
1 The operation succeeded.
SEE ALSO SSL_get_fd(3), SSL_set_bio(3), SSL_connect(3), SSL_accept(3), SSL_shutdown(3), ssl(3) , bio(3)1.0.1e 2013-02-11 SSL_set_fd(3SSL)