Hello
I'm trying to replace a string in multiple text files using the tcsh shell. For example I've got some files called test1 test2 test3 etc. Each of them contains "Hello World". Now I want to replace each "Hello" with "Howdy" using sed and a foreach loop.
I tried the following but it... (1 Reply)
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (2 Replies)
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Hi,
I have string like this:
$query="#1,apple";
$string=$query;
I want to replace #1 with fruit. I tried like this:
string=~s/#\d+/$query/ig;
print "\n string: $string\n";
It is working only when there is single #1 or #2 but when i give like #1,#2,#3,apple the above code... (2 Replies)
Hello.
I have five config files in /etc that I want to edit in one click for testing.
I would like to make a script like this :
#!/bin/bash
#
a_file="/etc/file_1"
src_str="src_string_1"
rpl_str="rpl_string_1"
calling_sed_or_awk_or_whatelse $a_file search_for_all $src_str replace_with... (4 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Hi, I'm new to Unix. My understanding of Unix and its command is very limited.
I have about 1000 text files that have a word in it that I need to replace with a different word.
e.g.
a.txt has 1 line of txt: monday, tuesday, wednesday
b.txt has 1 line of txt: monday, tuesday,... (5 Replies)
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Hello Guys,
I need to replace a string with multiple lines.
For eg:-
ABC,DEF,GHI,JKL,MNO,PQR,STU
need to convert the above as below:-
ABC,DEF,
GHI1
GHI2
GHI3,
JKL,MNO,
PQR1
PQR2
PQR3,
STU
i have tried using code as:- (2 Replies)
Discussion started by: jassi10781
2 Replies
LEARN ABOUT SUSE
udhcpd.conf
UDHCPD.CONF(5) GNU/Linux Administrator's Manual UDHCPD.CONF(5)NAME
udhcpd.conf - udhcp server configuration file
DESCRIPTION
The file /etc/udhcpd.conf contains configuration information specific to the udhcp server. It should contain one configuration keyword per
line, followed by appropriate configuration information.
OPTIONS
start ADDRESS
The starting address of the IP lease block is ADDRESS. The default is 192.168.0.20.
end ADDRESS
The ending address of the IP lease block is ADDRESS. The default is 192.168.0.254.
interface INTERFACE
The udhcp server should listen on INTERFACE. The default is eth0.
max_leases LEASES
Offer at most LEASES leases (including those reserved by OFFERs, DECLINEs, and ARP conflicts). The default is 254.
remaining REMAINING
If REMAINING is yes, store the time remaining for each lease. If it is no, store the expiration time for each lease. The default
is yes.
auto_time SECONDS
Write the lease information to a file every SECONDS seconds. The default is 7200.
decline_time SECONDS
Reserve an IP for SECONDS seconds if a DHCP decline message is received. The default is 3600.
conflict_time SECONDS
Reserve an IP for SECONDS seconds if an ARP conflict occurs. The default is 3600.
offer_time SECONDS
Reserve an IP for SECONDS seconds if it is offered. The default is 60.
min_lease SECONDS
Reserve an IP for the full lease time if the lease to be given is less than SECONDS seconds. The default is 60.
lease_file FILE
Write the lease information to FILE. The default is /var/lib/misc/udhcpd.leases.
pidfile FILE
Write the process ID to FILE. The default is /var/run/udhcpd.pid.
notify_file FILE
Execute FILE after the lease information is written. By default, no file is executed.
siaddr ADDRESS
BOOTP specific option. The default is 0.0.0.0.
sname NAME
BOOTP specific option. There is no default.
boot_file FILE
BOOTP specific option. There is no default.
option OPTION
DHCP specific option.
subnet ADDRESS
timezone OFFSET
router ADDRESS...
timesvr ADDRESS...
namesvr ADDRESS...
dns ADDRESS...
logsvr ADDRESS...
cookiesvr ADDRESS...
lprsvr ADDRESS...
hostname HOSTNAME
bootsize SIZE
domain DOMAIN
swapsvr ADDRESS
rootpath PATH
ipttl TTL
mtu MTU
broadcast ADDRESS
ntpsrv ADDRESS...
wins ADDRESS...
requestip ADDRESS
lease SECONDS
dhcptype TYPE
serverid ADDRESS
tftp FILE
bootfile FILE
The default for lease is 864000. There are no defaults for the other options.
SEE ALSO udhcpd(8).
GNU /Linux 2001-09-26 UDHCPD.CONF(5)