Search Results

Search: Posts Made By: madankumar.t@hp
2,645
Posted By Chubler_XL
These html file may contain different mark-ups,...
These html file may contain different mark-ups, style-sheets and the like merging them is not a trivial matter - you are probably best looking for an external tool that can merge them before you call...
5,593
Posted By cfajohnson
Do not use basename. It is an external command...
Do not use basename. It is an external command that is an order of magnitude slower than using the shell's parameter expansion.
3,893
Posted By Corona688
#!/usr/bin/perl # Use: script.pl YYYY-MM-DD...
#!/usr/bin/perl
# Use: script.pl YYYY-MM-DD file1 file2 ...
use Time::Local;
use POSIX qw(mktime strftime);

# arg 1 must be YYYY-MM-DD
my ($y, $mon, $d)=split("-", shift);
$mon--; # perl...
3,893
Posted By Corona688
What's your system? What's your shell? If you...
What's your system? What's your shell? If you have GNU date, which usually comes with Linux, this may be possible in the shell, otherwise you'll likely need a language like Perl.

NOW_STR=$(date...
1,783
Posted By RudiC
Yes, your first spec was not clear. Try this...
Yes, your first spec was not clear.
Try this for your new spec, based on Scrutinizer's approach:awk -v urllist="https://foo1.bar1 https://foo2.bar2" '

BEGIN {split (urllist, newurl, "...
1,783
Posted By Scrutinizer
Try something like: awk -v...
Try something like:
awk -v newurl="https://foo.bar" '$1=="remote"{$2=newurl} NR>1{print RS $0}' RS=\< FS=\> ORS= OFS=\> file
11,194
Posted By RavinderSingh13
Hello Madan, You should write actual...
Hello Madan,

You should write actual filename on place of Input_file and try the command.

awk '/^<logentry revision=/{A=1} A{O=O?O ORS $0:$0} /<QC_ID><\/QC_ID>/{print O;B=1;next} B{print $0}...
11,194
Posted By RudiC
The proposal in post#5 works out of the box!
The proposal in post#5 works out of the box!
11,194
Posted By Scrutinizer
Generalised version of RudiC's suggestion: awk...
Generalised version of RudiC's suggestion:
awk '/<logentry revision/{print x}1' file | awk -v key=QC_ID -v val="" '$0~"<" key ">" val "<"' RS=
11,194
Posted By RudiC
Try also sed '/<\/logentry>/a ' file | awk...
Try also sed '/<\/logentry>/a
' file | awk '/<QC_ID><\/QC_ID>/' RS=Please be aware that there MUST be a newline char after the a(ppend) command in sed!
11,194
Posted By RavinderSingh13
Hello Lakshmikumari, Following is the...
Hello Lakshmikumari,

Following is the explaination for same, hope this helps.

awk '/^<logentry revision=/{A=1} ###### Search for text <logentry revision= then set a variable named A to...
11,194
Posted By RavinderSingh13
Hello Madankumar.t@hp, Following may help...
Hello Madankumar.t@hp,

Following may help you in same.

awk '/^<logentry revision=/{A=1} A{O=O?O ORS $0:$0} /<QC_ID><\/QC_ID>/{print O;B=1;next} B{print $0} /<\/logentry>/{B=0;O=""}' ...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 09:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy