Is there a way that I can make the following work with using variables?
perl -pi -e 's#blah#hrm#ig' replacetext
but like this
var=blah
perl -pi -e 's#$var#hrm#ig' replacetext (3 Replies)
I have a variable whose value is
I="user1:x:1100:1200:ID for user1:/home/user1:/bin/ssh-dummy-shell"
I want to replace the last part '/bin/ssh-dummy-shell' with '/bin/true'
I tried using sed but it garbled
sed 's/\/bin\/ssh-dummy-shell/\/bin\/true' $I
Thanks for the help (5 Replies)
Is there an easy way of doing this
cat file1
jkasjhjgfg LTRIM(RTRIM(aa_bb_cde))
aragsfdg LTRIM(RTRIM(aa_bb_cde)) aregfafdgfg
sdgsfdagdfg gadfg
eafgsadgsa
asdgsfdgag LTRIM(RTRIM(aa_bb_cde)) rfghsdfhd
I want to replace each occurence of LTRIM(RTRIM($x)) with
LENGTH(LTRIM(RTRIM($x)))=0... (4 Replies)
I am trying to replace the default home page for several mac user accounts, I wrote a script that will hunt the files down and replace them with a pre-configured set. The problem I am having is that the download destination path for the browser is hard coded into a .plist (text config file) file... (5 Replies)
hi,
i have file say email.temp looks like
Bell_BB 17
Bell_MONTHLY 888
SOLO_UNBEATABLE 721
and another file r3
Bell BB,Bell_BB
Bell,Bell_MONTHLY
SOLO,SOLO_UNBEATABLE
i want email.temp files $1 say Bell_BB should be replaced by r3 Bell BB and Bell_MONTHLY by... (2 Replies)
Hi,
I'm making a script that automaticaly set file size and path in xml file.
I tried with :
sed -i 's/BOOTPATH/TEST/g' file.xml
it works fine
but if I use a viriable :
sed -i 's/BOOTPATH/$bootpathf/g' file.xml
with this one, no change are made.
I don't understand why. If a make a ... (13 Replies)
Hi Fellows,
I am new to shell, please help we me out in this..
i have file which some lines like this..
$$param1='12-jan-2011'
$$param2='14-jan-2011'
$$param3='30-jan-2011'
.
.
.....so on..
I want to change $$param3 to '31-dec-2011'. i have variable which is storing(30-jan-2011 this... (1 Reply)
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Hi,
I have a ksh script where I am trying to mask the password in the log files.
$loc - is my directory
$PGUIDE_DB_USER_PSW - is a variable that holds the password I am looking for
find $loc/logs -type f -exec sed -i "s/$PGUIDE_DB_USER_PSW/*****/"g {} \;
I get an error:
... (2 Replies)
Discussion started by: amitlib
2 Replies
LEARN ABOUT DEBIAN
latd.conf
LATD.CONF(5) File Formats Manual LATD.CONF(5)NAME
latd.conf - LAT configuration file
SYNOPSIS
/etc/latd.conf
DESCRIPTION
/etc/latd.conf is a shell script (run by /bin/sh) that is run when latd is started up using the latcp -s command.
It contains commands used to customise lat for your site and usually consists of a list of latcp commands.
latd.conf is run with a minimal PATH and a minimal environment. The variable $LATCP points to the latcp binary used to invoke the script.
EXAMPLE
# /etc/latd.conf
# This is a sample configuration file for latd
# it is run as s shell script from latcp -s with a minimal
# environment and PATH. latcp should be invoked using the
# environment variable $LATCP.
#
# You can fiddle with all the latd parameters you like in here,
# the first service announcement will not be made until this
# script completes.
#
# Set the multicast timeout to 30 seconds
$LATCP -m 30
# Add another login service
$LATCP -A -a ZAPHOD -r 100
# Add a queued reverse LAT service to a printer on a DECserver
$LATCP -A -p /dev/lat/printer -Hdecserver -Vdecserver -Q
# Only advertise our service in groups 1-10 and 200
$LATCP -G 1-10,200
exit
SEE ALSO
latcp(8), latd(8)LAT Server June 2 2000 LATD.CONF(5)