Search Results

Search: Posts Made By: Neethu
11,355
Posted By Aia
Using the system() function to execute Perl code...
Using the system() function to execute Perl code inside a Perl script is like using a wheelchair on someone that does not have problems running. Don't let a few more lines of code fool you.
...
1,221
Posted By ahamed101
Put the commands within $(...) and use " instead...
Put the commands within $(...) and use " instead of '


sed -n "/$(TZ=GMT+1 date +%Y-%m-%d" "%H:%M:%S)/,/$(TZ=GMT date +%Y-%m-%d" "%H:%M:%S)/p" Logfile


--ahamed
1,628
Posted By Revansidhu
use this command awk...
use this command

awk -F"<oID>|</oID>|<status>|</status>" '{print $2":"$4}' file | awk -F: '{ if( $1 == "A123") {print "oID:"$1" status:"$2} else print "oID not maching" }'


---------- Post...
8,677
Posted By RudiC
Above is working well if timestamp1 is the only...
Above is working well if timestamp1 is the only tag in one line, and if there's no gap (space) between the two tags. For a bit more generic case, tryawk ' BEGIN {"date +%Y%m%d%H%M%S"|getline TS}
...
8,677
Posted By Yoda
Sure, here is the explanation of code: awk...
Sure, here is the explanation of code:
awk -F'[<>]' ' # Set < > as field separators.
BEGIN { ...
5,237
Posted By RudiC
NOW I see - despite your first sample you are NOT...
NOW I see - despite your first sample you are NOT using digits only in the fields.Try grep -E 'BR=[[:alnum:]]+;|BRC=[[:alnum:]]+;|BRD=[[:alnum:]]+$' file...
5,237
Posted By pamu
Assuming you have three fields to check only.. ...
Assuming you have three fields to check only..

awk -F ";" '{a=0;for(i=1;i<=NF;i++){if($i ~ /BR|BRC|BRD/){split($i,P,"=");if(P[2] == ""){a++}}}{if(a==3){$0="blank"}}}1' OFS=";" file
5,237
Posted By pamu
try awk -F ";" '{for(i=1;i<=NF;i++){if($i...
try


awk -F ";" '{for(i=1;i<=NF;i++){if($i ~ /GH|IJ|KL/ && length($i) <=3){$0="Blannk";break}}}1' OFS=";" file

also can be written as

egrep -v "GH=;|IJ=;|KL=$" file

pamu
2,428
Posted By pamu
Assuming your attachment is being sent by using...
Assuming your attachment is being sent by using uuencode.
Try to decode that file..

use

uudecode -o output_file input_file
Hope this helps you..
Showing results 1 to 9 of 9

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