Search Results

Search: Posts Made By: Calypso
7
awk
1,806
Posted By Calypso
awk
Input

26.9,3.2,1.87,2.38,8.41,1.7,0.846,1.27,1.81,3.41,2.53,0.085,45.2

Desired Output

CHS_26_9x3_2(26.9,3.2,2.38,1.7),

What I have so far nearly works, it just doesnt replace the first...
1,392
Posted By Calypso
[solved]awk count occurences in time window
Input File
Time, KeyStation
00:00:00,000;KS_1
00:00:01,000;KS_1
00:00:02,000;KS_1
00:00:03,000;KS_1
00:00:04,000;KS_1
00:00:05,000;KS_1
00:00:06,000;KS_1
00:01:01,000;KS_1
00:01:02,000;KS_1...
2,060
Posted By Calypso
Thanks Pamu, I see your storing the index's in a...
Thanks Pamu, I see your storing the index's in a 2D array, thats clever.

Thanks again!
2,060
Posted By Calypso
Hi Pamu, Sorry I did word it badly, let me...
Hi Pamu,

Sorry I did word it badly, let me try again..

I want to have a count of active orders for each marketplace, keystation combination. The count should be incremented on a 'SENT' order...
2,060
Posted By Calypso
awk count occurences
line number:status, market, keystation
1,SENT,EBS,1 : 1
2,DONE,REU,1 : 1
3,SENT,EBS,2 : 1
4,DONE,EBS,1 : 0
5,SENT,EBS,2 : 0
6,SENT,EBS,2 : 0
7,SENT,EBS,2 : 0
8,SENT,EBS,1 : 1

for each...
10,635
Posted By Calypso
Sorry for the late reply, columns worked a treat....
Sorry for the late reply, columns worked a treat.

Thanks everyone for helping out
10,635
Posted By Calypso
Hi RudiC, that kind of works, but not really....
Hi RudiC, that kind of works, but not really. Some columns are very short fileds i.e 1 or 2 chars, and some column are 20-25 chars wide.

If I increase -15 -> -30, the file goes over multiple...
10,635
Posted By Calypso
Awk print all columns in delimited file
text file example
1,222222222222,333,444444444444444
111111111,22,33333333,444


desired output
1 222222222222 333 444444444444444
111111111 ...
3
3,104
Posted By Calypso
Thanks for that, do you know what the 5 represent...
Thanks for that, do you know what the 5 represent too?
8,752
Posted By Calypso
Could you just remove spaces prior to comparsion...
Could you just remove spaces prior to comparsion using either tr or sed e.g

sed 's/ //g'
3
3,104
Posted By Calypso
sort
I check the man page but I still cannot see what this command is supposed to do

sort +5 -6 <file>

It just seems to sort the file as normal??

Thanks
Calypso
5,658
Posted By Calypso
Thanks pretty obvious now I think about it ...
Thanks pretty obvious now I think about it
Calypso
5,658
Posted By Calypso
Awk println
How do you print variables and your own words on the same line

ie in bash I would write something like
name="Calypso"

echo "your name is $Calypso"

how does awk differentiate between...
1,773
Posted By Calypso
Thanks for clearing that up
Thanks for clearing that up
1,773
Posted By Calypso
basic scripting syntax
In bash scripts please can someone tell me if the below is the correct syntax for comparing integers and strings;

for integers -

if [ $number1 -gt $number2 ];then

for strings -

if [...
1,259
Posted By Calypso
Yeh I just checked my mail, your right all my at...
Yeh I just checked my mail, your right all my at requests are there

Thanks pludi
1,259
Posted By Calypso
using at
any reason why this doesn seem to work



if the time now is 1430 commands im using

at 1431
at> echo "time is 1431"

then it prints out
commands will be executed using /usr/local/bin.bash...
9,410
Posted By Calypso
Thanks again tyler
Thanks again tyler
3,170
Posted By Calypso
please could you just explain why it only works...
please could you just explain why it only works with egrep and not the normal grep

also please could just confirm the following

^ means must start with pattern
+ means one or more occurence of...
3,170
Posted By Calypso
Thanks a lot!, works a charm
Thanks a lot!, works a charm
3,170
Posted By Calypso
regex and grep
I want it to find lines that contain any number of capital letters before P

this is what I have tried
echo "AAAAAP" | grep '[A-Z]P'
echo "AAAAAP" | grep '[A-Z]\{1\}P'
echo "AAAAAP" | grep...
9,410
Posted By Calypso
Thanks for that, I just had one more...
Thanks for that,

I just had one more question about grep, is it possible to match possible multiple patterns for example how could i say find lines that match

1. "^aa.*$" AND ends with "aa"
...
9,410
Posted By Calypso
this echo "aaaa" | grep "^aa*$" returns aaaa ...
this
echo "aaaa" | grep "^aa*$"
returns aaaa

but this
echo "aaa1" | grep "^aa*$"
returns nothing

Calypso
4,971
Posted By Calypso
try this, fileCount=`ls | wc -l` echo...
try this,

fileCount=`ls | wc -l`
echo $fileCount

although i seem to remember having to pipe to sed as well to remove all the blank spaces that wc returns

Calypso
9,410
Posted By Calypso
grep regular expression
please can someone tell me what the following regrex means

grep "^aa*$" <file>

I thought this would match any word beginning with aa and ending with $, but it doesnt.

Thanks in advance
...
Showing results 1 to 25 of 37

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