Search Results

Search: Posts Made By: Viswanatheee55
3,829
Posted By RavinderSingh13
Hello Viswanatheee55, Could you please try...
Hello Viswanatheee55,

Could you please try following and let me know if this helps you, I have only tested this with your provided Input_file.

awk 'BEGIN { FS="[<>]"; OFS=",";s1="\"" ...
3,829
Posted By Scrutinizer
Try using "," as the field separator awk ' ...
Try using "," as the field separator
awk '
$1=="/" idx {
if(!Rec) Header=Header "," idx
Values=Values "\",\"" val
}
{
idx=$1
val=$2
}
$1=="/workOrder" {
...
2,557
Posted By Aia
Just add the highlighted -i flag. Do not include...
Just add the highlighted -i flag. Do not include the >> file.xml part.
perl -i -pe 'BEGIN{$/="<name>"} if(/XXX<\/name/){s/Delay/Down/g}' file.xml
2,557
Posted By Don Cragun
If the command: perl -pe 'BEGIN{$/="<name>"}...
If the command:
perl -pe 'BEGIN{$/="<name>"} if(/XXX<\/name/){s/Delay/Down/g}' file.xml
produces the data you want to appear in your file on the screen, and there are one or more hard links to...
2,557
Posted By RudiC
You seem to have at least heard of redirections,...
You seem to have at least heard of redirections, but >> is MEANT to append to files, so above described behaviour is no surprise. Don't use the single > to the input file either as it would destroy...
Showing results 1 to 5 of 5

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