Browsing the archives for the lazyweb tag.

Spot the shell bug.

Uncategorized

This is bugging me. I’m missing something obvious here, and I can’t see what.
I have this script that I use to sync the fedora rawhide tree locally. It works fine. But something odd happens with the tests for complete trees.

As you can see in this screenshot, sometimes the ‘incomplete’ message gets printed in green, even though the echo is prefixed with the escape codes for red.

lazyweb , wtf is going on here?

UPDATE: Duhh. typo on line 37. The ‘incomplete’ should say ‘complete’
(When trying to debug this, I replaced ‘complete’ and ‘incomplete’ with ‘red’ and ‘green’. *headdesk*)

1 Comment

setting signature based on From/To in mutt.

Uncategorized

Lazyweb, help me out.
I use mutt to read multiple mail accounts. Using alternates, I have it rigged so that when I reply to someone it sets my From: to the same as the address that they sent the mail To: Straight-forward stuff.

What I’d like to do next is set my .signature based upon the same rule.
I thought that this can be done easily enough with send-hooks like..
send-hook mutt- 'set signature=~/.signature1; my_hdr From: Dave Jones <emailaddress1>'
send-hook mutt- 'set signature=~/.signature2; my_hdr From: Dave Jones <emailaddress2>'

But that just seems to make it pick signature1 regardless of any header.

I googled a while, but turned up dead ends. profiles look interesting, but I’d rather not have to swap between things manually. Likewise, it looks possible to do it on a per-folder basis, but I want this to work with =mbox where all accounts land unfiltered.

Anyone set up something similar ?

2 Comments

Graphical objdump ?

Uncategorized

Hi Lazyweb. I’m curious if a tool exists already to do something I have in mind..

Take an example of objdump -x on a file..

0 .note.gnu.build-id 00000024 0000000000000000 0000000000000000 00000040 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .text 0002a374 0000000000000000 0000000000000000 00000064 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
2 .exit.text 000000cb 0000000000000000 0000000000000000 000416b8 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
3 .init.text 00000e35 0000000000000000 0000000000000000 00041ad0 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
4 .ref.text 000000b9 0000000000000000 0000000000000000 00044828 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
5 .rodata 00001bc2 0000000000000000 0000000000000000 000449f0 2**4
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
6 .rodata.str1.1 00001e97 0000000000000000 0000000000000000 00048688 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 __bug_table 00000270 0000000000000000 0000000000000000 0004a51f 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
8 .smp_locks 00000a90 0000000000000000 0000000000000000 0004ac70 2**3
CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA

I’m curious what strings are in that .rodata.str1.1 section vs the .rodata section. I’d really like a gtk UI that allows me to click that entry, and have it expand to show me what’s in there. The app could be extra smart and have knowledge about what to do for specific sections, (like passing .text to objdump -d). For sections it doesn’t grok, it could just print a hexdump.

Anything like this already exist?

4 Comments


  • huaglahglah huaglahglah