Hi,
I have prepared script which is taking more time to process. find below script and help me with fast optimized script:-
cat name.txt | while read line
do
name=$(echo $line| awk '{print $8}')
MatchRecord=$(grep $name abc.txt | grep -v grep )
echo "$line | $MatchRecord" | awk... (2 Replies)
Hi all,
I implemented an application, through using c++ and compiled it with g++.
At first, what I did is (@ compilation):
g++ calcBacon.C -o test -DDEBUG
after I ran my application it took almost 120 sec. to finish its execution
when I compiled with optimization parameters, execution... (5 Replies)
:o Hi,
I am writing a script in which at some time, I need to get the process id of a special process and kill it...
I am getting the PID as follows...
ps -ef | grep $PKMS/scripts | grep -v grep | awk '{print $2 }'can we optimize it more further since my script already doing lot of other... (3 Replies)
I have a file which contains 9,200,000. It contains 125 clolumns. I have to rearrange some columns and exclude some of them. I scripted the following script to do the same. It is working fine but it is taking more than 4hrs to do it. can it be optmized.
Here is the script
LOC="/sourcefile/"... (3 Replies)
Hello,
Do you have any tips on how to optimize the AWK that gets the lines in the log between these XML tags?
se2|6|<ns1:accountInfoRequest xmlns:ns1="http://www.123.com/123/
se2|6|etc2">
.... <some other tags>
se2|6|</ns1:acc
se2|6|ountInfoRequest>
The AWK I'm using to get this... (2 Replies)
I have a process using the following series of sed commands that works pretty well.
sed -e 1,1d $file |sed 1i\\"EHLO Broadridge.com" |sed 2i\\"MAIL FROM:${eaddr}"|sed 3i\\"RCPT TO:${eaddr}"|sed 4i\\"DATA"|sed 5s/.FROM/FROM:/|sed 6s/.TO/TO:/|sed 7,7d|sed s/.ENDDATA/./|sed s/.ENDARRAY// >temp/$file... (1 Reply)
Hi ,
I need some help on optmizing the make file.
I have the below scenario.
SOUTHERN_XITEM_PROGS=\
sfmxitem.rel \
sfqxitem.rel
SOUTHERN_XITEM_DEPS= southern_xitem.c
SUPERSVU_XITEM_PROGS=\
su3xitem.rel
SUPERSVU_XITEM_DEPS= supersvu_xitem.c
$(SOUTHERN_XITEM_PROGS) : $$@.o... (1 Reply)
hi guys ,
I have 10 scripts
suppose 1.sh , 2.sh ,3.sh ,4.sh ......10.sh
each takes some time ( for instance 2 minutes to 40 minutes )
my server can run around 3-4 files at a time
suppose,
1.sh ,
2.sh ,
3.sh
are running currently now as soon as ANY ONE of the gets finished i... (4 Replies)
Discussion started by: Gl@)!aTor
4 Replies
LEARN ABOUT OSF1
escape
escape(1) Mail Avenger 0.8.3 escape(1)NAME
escape - escape shell special characters in a string
SYNOPSIS
escape string
DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result.
EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string:
$ var='; echo gotcha!'
$ eval echo hi $var
hi
gotcha!
$
Using escape, one can avoid executing the contents of $var:
$ eval echo hi `escape "$var"`
hi ; echo gotcha!
$
A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For
example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient:
#!/bin/sh
formail -x to -x cc -x resent-to -x resent-cc
| fgrep "$1" > /dev/null
&& exit 0
echo "<$1>.. address does not accept blind carbon copies"
exit 100
To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt
script:
bodytest reject_bcc `escape "$RECIPIENT"`
SEE ALSO avenger(1),
The Mail Avenger home page: <http://www.mailavenger.org/>.
BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells.
AUTHOR
David Mazieres
Mail Avenger 0.8.3 2012-04-05 escape(1)