Search Results

Search: Posts Made By: Flavius
3,512
Posted By Flavius
Wow, makes sense now. Thanks a lot
Wow, makes sense now. Thanks a lot
3,512
Posted By Flavius
Oh man, this works thanks a lot. Any reasonable...
Oh man, this works thanks a lot. Any reasonable explanation for this??
3,512
Posted By Flavius
It's gotta be the craziest bug of my carrier. ...
It's gotta be the craziest bug of my carrier.


cat $_file | while read _line
do

if [ "$_line" = "CDRCCN.ChargingDataOutputRecord.onlineCreditControlRecord" ]; then
# ...
3,512
Posted By Flavius
Loop counter resets by itself
Hi!

Can anyone explain this? The counter CDR_count should go on forever, but it suddenly resets at every step of the FOR loop (I know this because $_file has exactly 378 records). However, the...
1,634
Posted By Flavius
sed - filter blocks between single delimiters matching a pattern
Hi!

I have a file with the following format:CDR
...
MSISDN=111
...

CDR
...
MSISDN=xxx
...

CDR
...
MSISDN=xxx
...

CDR
...
MSISDN=111
3,062
Posted By Flavius
Yes, this worked, thanks a lot! Returns true for...
Yes, this worked, thanks a lot! Returns true for both digits and star
3,062
Posted By Flavius
Thanks, this works alone but when I combine it...
Thanks, this works alone but when I combine it with the second condition it doesn't return true when it encounters a star:


#!/bin/sh
_CHAR="*"
if [ $_CHAR -eq $_CHAR 2>/dev/null -o...
3,062
Posted By Flavius
Jesus if [ $_CHAR == "*" ]; then ...
Jesus



if [ $_CHAR == "*" ]; then
_VALUE=$_VALUE$_CHAR
else
_ISDIGIT="false"
fi

./test.sh: line 23: [: too many arguments
3,062
Posted By Flavius
This is getting more and more awkward. -o option...
This is getting more and more awkward. -o option works from a syntax point of view, but the expression doesn't return true when it encounters a star.

Furthermore:


if [$_CHAR == "*" ];...
3,062
Posted By Flavius
I don't know what the dev/null does, got the...
I don't know what the dev/null does, got the example from the internet and it doesn't work without it:



if [ $_CHAR -eq $_CHAR ]; then

./test.sh: line 23: [: -: integer expression...
3,062
Posted By Flavius
IF OR with two conditions
I have this IF working fine, testing if a char is a digit:


if [ $_CHAR -eq $_CHAR 2>/dev/null ]; then
_VALUE=$_VALUE$_CHAR
else
_ISDIGIT="false"
fi

...
3,028
Posted By Flavius
I think I'll go with your one liner and work on...
I think I'll go with your one liner and work on its printout. I then can easily extract all the fields I need, by using separators GT, SPC, etc on the left and space on the right.

To make it more...
3,028
Posted By Flavius
This is pretty close. What I want actually is to...
This is pretty close. What I want actually is to store each of those numbers in variables within a script, so I can use them later in the code:

for i in `cat infile.txt`
do

GT=`echo $i | sed...
3,028
Posted By Flavius
Extract number that comes after a given string
Hi!

I have a file that contains non-regular strings like:
SCSGTI:N="$4,0,1,4,34622991111-->RemoteSPC: 1111", NWID=1;
SCSGTI:N="$4,0,1,4,34622991211-->RemoteSPC: 1211", NWID=1;...
Showing results 1 to 14 of 14

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