11-06-2008
I was able to get through this issue using the eval option
for LINE in `sed -n '/ '${DB}' /,/ End /p' infile| grep -v ^#`; do
eval `echo "export " ${LINE}`
done
Thanks
Rajan
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am trying to replace a URL by another URL in the SED command e.g.
cat dir/filename1 | sed -e 's/"http:\/\/*dtd"/"http:\/\/abc.def.com\/xyz.dtd"/' > dir/newfile.xml
But I need to pass a parameter to the SED command which should have the new url string i.e.... (2 Replies)
Discussion started by: dsrookie
2 Replies
2. Shell Programming and Scripting
Hi,
I need an awk command that would parse the below expression
Input Format
1 'Stmt1 ............................'2 'Stmt2 ............................'3 'Stmt3 ............................'4 'Stmt4 ............................'5 'Stmt5 ............................'6 'Stmt6... (1 Reply)
Discussion started by: rajan_san
1 Replies
3. Shell Programming and Scripting
Hi there, am trying to parse an Apache 'server' config file. A snippet of the config file is shown below:
.....
ProxyPassReverse /foo http://foo.example.com/bar
.....
.....
RewriteRule ^/(.*) http://www.example.com/$1
RewriteRule /redirect https://www.example1.com/$1
........ (7 Replies)
Discussion started by: jy2k7ca
7 Replies
4. Shell Programming and Scripting
Input:
hello hello
hello hello
monkey
donkey
hello hello
drink
dance
drink
Output should be:
hello hello
monkey
donkey
drink
dance (9 Replies)
Discussion started by: cola
9 Replies
5. Shell Programming and Scripting
Hi,
I am modifying a file with sed command. i want to make SCORE= blank in the file whereever SCORE=somevalue.
What will *$ do in the below command?
cat $file | sed 's/SCORE=.*$/SCORE=\r/g' > newfile
The last line is also missing in the new file. How to make SCORE='100' to SCORE=... (5 Replies)
Discussion started by: ashok.k
5 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I need help on the following req.
I am getting output of a command as follows:
16377612 total memory
3802460 used memory
2827076 active memory
681948 inactive memory
12575152 free memory
477452 buffer memory
I want to compute used... (1 Reply)
Discussion started by: mailsara
1 Replies
7. Shell Programming and Scripting
AWK Command parse a file based on string.
I am trying to write a shell script to parse a file based on a string and move the content of the file to another file.
Here is scenario.
File content below
Mime-Version: 1.0
Content-Type: multipart/mixed;
... (2 Replies)
Discussion started by: aakishore
2 Replies
8. Shell Programming and Scripting
Hi
I know sed and awk has options to give range of line numbers, but
I need to replace pattern in specific lines
Something like
sed -e '1s,14s,26s/pattern/new pattern/' file name
Can somebody help me in this....
I am fine with see/awk/perl
Thank you in advance (9 Replies)
Discussion started by: dani777
9 Replies
9. Shell Programming and Scripting
Hi,
In order to make our debugging easier in log files, I need this script.
My log file will be structured like this :
------Invoking myfile -param:start_time=1371150900000 -param:end_time=1371151800000 for 06/14/2013
<multiple lines here>
.....
- Step Sybase CDR Table.0 ended... (3 Replies)
Discussion started by: Lakshmikumari
3 Replies
10. Shell Programming and Scripting
Hi,
I have been stuck in this requirement where my file contains the below format.
20150812170500846959990854-25383-8.0.0
"ABC Report" hp96880
"4952"
20150812170501846959990854-25383-8.0.0 End of run
20150812060132846959990854-20495-8.0.0
"XYZ Report" vg76452
"1006962188"... (6 Replies)
Discussion started by: Chinmaya Kabi
6 Replies
LEARN ABOUT CENTOS
ipc::run::debug
IPC::Run::Debug(3) User Contributed Perl Documentation IPC::Run::Debug(3)
NAME
IPC::Run::Debug - debugging routines for IPC::Run
SYNOPSIS
##
## Environment variable usage
##
## To force debugging off and shave a bit of CPU and memory
## by compile-time optimizing away all debugging code in IPC::Run
## (debug => ...) options to IPC::Run will be ignored.
export IPCRUNDEBUG=none
## To force debugging on (levels are from 0..10)
export IPCRUNDEBUG=basic
## Leave unset or set to "" to compile in debugging support and
## allow runtime control of it using the debug option.
DESCRIPTION
Controls IPC::Run debugging. Debugging levels are now set by using words, but the numbers shown are still supported for backwards
compatibility:
0 none disabled (special, see below)
1 basic what's running
2 data what's being sent/recieved
3 details what's going on in more detail
4 gory way too much detail for most uses
10 all use this when submitting bug reports
noopts optimizations forbidden due to inherited STDIN
The "none" level is special when the environment variable IPCRUNDEBUG is set to this the first time IPC::Run::Debug is loaded: it prevents
the debugging code from being compiled in to the remaining IPC::Run modules, saving a bit of cpu.
To do this in a script, here's a way that allows it to be overridden:
BEGIN {
unless ( defined $ENV{IPCRUNDEBUG} ) {
eval 'local $ENV{IPCRUNDEBUG} = "none"; require IPC::Run::Debug"'
or die $@;
}
}
This should force IPC::Run to not be debuggable unless somebody sets the IPCRUNDEBUG flag; modify this formula to grep @ARGV if need be:
BEGIN {
unless ( grep /^--debug/, @ARGV ) {
eval 'local $ENV{IPCRUNDEBUG} = "none"; require IPC::Run::Debug"'
or die $@;
}
Both of those are untested.
AUTHOR
Barrie Slaymaker <barries@slaysys.com>, with numerous suggestions by p5p.
perl v5.16.3 2012-01-16 IPC::Run::Debug(3)