hey
how can i change part of a file
i hve to do in a masses so mv or cp is not practical.
I have to change xxx_rrr to xxx_yyy
pls help
thank (2 Replies)
I was using the following code to replace the path names and it works when it is
echo "$PWD/$f" | sed -e 's/^.*chris\.domain\.com/chris.domain.com/'
IN fact it works great
However I tried to incorporate a variable
echo "$PWD/$f" | sed -e... (3 Replies)
Hi Guys,
I am needing some help writing a shell script to replace the following in a text file
/opt/was/apps/was61
with some other path eg
/usr/blan/blah/blah.
I know that i can do it using sed or perl but just having difficulty writing the escape characters for it
All Help... (3 Replies)
Im new to using perl scripting, and i was wondering if anyone could help me, I need to create a cgi file that when it runs it opens a file looks through all the words, and replace the word hello with goodbye, ive been looking around and someone said to use an If statement, but ive found no other... (2 Replies)
Dear all,
In a bash script, I grep a filename from an UTF8 encoded file:
LIST=`grep ^source $FILE | tr "\t" " " | cut -d " " -f 2 | sed -e 's,~,\$HOME,g'`
The result is
# echo $LIST
$HOME/.mail_aliases_seminaire_MMMG
Then I try to access it:
#ls $LIST
ls: cannot access... (3 Replies)
I am following the tread number 81556 to grep a file and send the results in email.
#/bin/bash
/bin/grep -i 'invite sip' /var/log/asterisk/full
if echo "found" |
mail -s 'invite sip' mail@gmail.com
When I just build it to grep and mail, it works fine. However, the if statement causes... (4 Replies)
I have file like this
"copy table_name from filea.txt on node replace delimiter '|';"
"copy table_name from fileb.txt on node replace delimiter '|';"
"copy table_name from filec.txt on node replace delimiter'|';"
"copy table_name from filee.txt on node replace delimiter '|';"
"copy... (1 Reply)
I want get a number(ID) from a sentence which has been grepped from file using error number.
For Example:
#!/bin/ksh
echo "Enter RRS ID: "
read rrs
echo "Enter error number:"
read err
scp -pr ptc-avdbamdw102:/home/icsprd/M3logs/Accurate/logs/corp_post/$rrs.*.err.txt $HOME/daemon_mail/... (7 Replies)
Hi Everyone,
I am a bit new at learning this bash syntax. I have a problem at work that needs to be addressed. We find we are spending quite a bit of time killing old processes created by oracle replication that have been restarted later in the week. Because the replication takes time to... (3 Replies)
We have C shell and we are executing the below script:
#!/bin/csh -f
if ($#argv != 2) then
echo "Usage $0 DirecotryPath Inputfilename"
exit 1
endif
set dir=$1
set fname=$2
echo $dir
foreach line ( `cat $fname` )
echo \ ======================================== >>... (2 Replies)