[PLUG] [TOOL-Release] TMAC for Linux

Sagar Belure sagar.belure at gmail.com
Fri May 7 15:14:54 IST 2010

On Fri, May 7, 2010 at 2:29 PM, Kulkarni Shantanu <
linux at shantanukulkarni.org> wrote:

> * Sagar Belure <sagar.belure at gmail.com> [100507 13:27]:
> > So, this is it. I'm really happy to release this tool and little curious
> > though, to receive the suggestions from you people and any kind of
> feedback
> > would be appreciable.
> > I know, there must be lot more improvements to make it work better.
> > So, this is my request all of Linux users, please try this once at least
> and
> > send me your suggestions/feedback.
> > I really would like to hear ANY kind of feedback about it, doesn't
> matter,
> Thanks for the efforts. I was looking for just this kind of tool just
> yesterday.
> Since you invited _any_ kind of feedback, here is some of my feedback
> about scripting style (purely personal). Please take it as positive
> criticism.
> a. This is a bash script, right? I would prefer it to be called tmac.bash.
> b. Since it is bash script, why not make use of [[...]] instead of
> [...]. This will save a lot of quoting and also safeguard in case you
> forget to quote (like on line 98). Also, why not == instead of =? (I
> know that = is portable and POSIX compliant - but this is a bash script,
> so you can make use of bash features).
> c. I feel some unnecessary commands can be weeded out like on lines 81,
> 82, 83, 113, 119 etc. e.g.
> grep '...' | wc can be grep -c '...'
> ifconfig | grep ... | awk can be ifconfig | awk '/.../ {.....}'
> grep | head | tail | cut | awk  can be written in one awk statement.
> Well, you know what I mean.
> d. I would personally use printf instead of the (maybe) non-portable
> echo -e and echo -n switches.
> e. Let your exit return values, so we know at which point it failed.
> f. let "i+=1", is it really portable or should you stick with let i=i+1
> c. Be aware that some Linux systems (atleast a few years back) didn't
> install bc by default. I guess using awk to do the calculations can do
> the trick or atleast check for existence of bc.
> I am yet to use the script. I will give some more feedback later if I
> find something interesting or wrong.
> Thanks,
> Shantanu
> www.shantanukulkarni.org
> _______________________________________
> Pune GNU/Linux Users Group Mailing List

Hi Shantanu,

I really want to thank you, for all those comments.

Well, this is the only reason I invited all to give ANY kind of
suggestions/feedback about it, because of the thing that I'm no coder.
I'm not used to code in any language and not even used to with the

This, was my first attempt to make something of this kind script.
To tell you the truth, I had not thought about all those things, you
mentioned like quoting, safeguard, portability, etc.
But, I will make sure, to dig into all those things and make it better as
much as I can.

I really appreciate your comments, and for sure, will look into all those

Sagar Belure
Security Analyst
Secfence Technologies

More information about the Plug-mail mailing list