1) I am not very good at memorizing stuff, nor do I think the human brain is optimized for that task. I'm much better at making inferences and deductions instead.
2) I know what parameter substitutions are -- in general. But I can't bring myself to remember the difference between
Everytime I see one of those, I have to open a terminal and make a small test to figure out which is which. And thats only an example, there are many other similar looking constructs that do not give the slightest hint to what they actually do. My memory is weak, and when I can't use my deductive and inferential powers, I end up wasting time figuring out what they do. A classic example, if you only knew minimal bash, how much time do you need to understand what this does:
versus:
The second code provides some semantics for you to infer what the code does. The first one relies on your memory. The brief way to sum my point is that parameter substitutions are NOT easily readable.
3) Even if you were a parameter substitution guru, and you used meaningful variable names and comments to make clearer what your parameter substitution tricks do, then future maintainers of the code might not be the same. This bit me a couple of days ago: I had to spend 20 minutes debugging a bash script riddled with those parameter substitution scripts. I estimate I would've spent closer to 5 minutes if the code was written using more obvious external tools (sed, basename, awk). This is about 15 minutes of human time wasted in order to save less than a few milliseconds of CPU time. Especially since the whole script runs only once a night, and does not exceed 0.030 seconds runtime on my modest 7 years old computer.
4) The conclusion for me is that parameter substitution should only be used when and only if the need arises. Anything else is premature optimization at the cost of more developer hours debugging and maintaining the code. If I have a script that takes 4 seconds to execute, which could be optimized into running within less than a second using parameter substitution, that still would not -- on its own -- make a convincing case to use param substitution. For a convincing case to be made, the need to reclaim the additional seconds of CPU time must be established and weighed against the loss in human seconds needed to maintain and develop the code.
Hi,
I am new to this forum and unix too. I have just started learning unix. As I was going through the first chapter, I read that unix is multitasking, multiprogramming, multiprocessing and multiuser OS.
My question is: Is there any difference between a TASK and a PROCESS. How are PROCESS... (2 Replies)
I have a file contains
TASK gsnmpproxy {
CommandLine = $SMCHOME/bin/gsnmpProxy.exe
}
TASK gsnmpdbgui {
CommandLine = $SMCHOME/bin/gsnmpdbgui.exe
I would like to comment and than uncomment specific task eg TASK gsnmpproxy
Pls suggest how to do in shell script (9 Replies)
I have an task definition listing xml file that contains a list of tasks such as
<TASKLIST
<TASK definition="Completion date" id="Taskname1" Some other
<CODE name="Code12"
<Parameter pname="Dog" input="5.6" units="feet" etc /Parameter>
<Parameter... (3 Replies)
believe it or not but this is my first c program (i've worked with java, C#, php though) I am trying to make a daemon that checks if mplayer is running(it's for a projection room) and if it is not then to run mplayer with a file.. So far it's not working and I don't know why
Help and comments... (5 Replies)
Hello,
I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error
" reboot and select proper Boot device or insert Boot media in select Boot device and press a key "
I have tried CD and... (0 Replies)
Hi all,
I'm newbie and stuck here. Thanks for any help.
Input(txt file)
a b X
c d Y
e f Z
g h W
Requested output:
a b X Y
c d Y X
e f Z W
g h W Z
Please use code tags when posting data and code samples! (10 Replies)
Hi experts,
I have a problem with the below shell task:
I need to modify the file creatin a paired row , per each row
which matches filter (e.g. number of nonempty columns = 5)
Output should look like this:
second row is original one from the input,
first row(red) is pairing row, it's... (29 Replies)
I have a simple task for my school work. I'm new with unix, so i need help.
I need to write a scenario. Task is. From created txt file read first 3 words and create a 3 catalogs with those 3 words. 2 of those new catalogs should be transferred to other directory. If someone could help me just... (1 Reply)
Discussion started by: justynykas
1 Replies
LEARN ABOUT DEBIAN
makeastheme
MAKEASTHEME(1x)MAKEASTHEME(1x)NAME
makeastheme, installastheme - manage themes in the Afterstep windows manager.
SYNOPSIS
makeastheme [--theme <theme_name>] [--no_wharf] [--no_pager] [--no_winlist] [--no_background]
installastheme [--theme <theme_name>] [--no_wharf] [--no_pager] [--no_winlist] [--no_background]
DESCRIPTION
This bundle of two Perl scripts is used to implement themes in the AfterStep window manager for X (http://www.afterstep.org).
At this time, these scripts are becoming solid beta quality. I would still highly recommend you to backup your configuration files in the
~/.afterstep dir. The easiest way to undo a theme is to simply restore your old files.
This theme pack currently supports the following modules and options:
Wharf: Pager:
BgColor Align
Pixmap Back
TextureColor BalloonBack
TextureType BalloonBorderColor
BalloonBorderWidth
WinList: BalloonFore
Font DesktopImage
Fore Font
Back Hilight
Justify Image
Pixmap (AS 1.5b6 pl2) SmallFont
Of course, the look file and desktop background is supported. Also, any images specified in the look file or the module options above are
also carried with the theme that is built.
This theme pack expects to find the ~/.afterstep/desktop/themes directory. Each theme should be a subdirectory from there. When you down-
load a theme, untar it in the themes dir. Also, when you build a theme, if you want to bundle any unique icons for use in the database
file, put them in the specific subir of the themes dir.
Also, the theme pack will only look in ~/.afterstep for module configuration files. That means when building a theme, it only takes modi-
fications from that dir. If the config files aren't there, makeastheme will ignore that module. When installing a theme, installastheme
will only edit files in ~/.afterstep. If it doesn't find any modules there, it will skip that module. At a minimum, you should have
'wharf', 'pager', and 'winlist' files in the ~/.afterstep dir.
OPTIONS
Both installastheme and makeastheme take the same command line, which can be in any order. The directory from which the scripts are called
is irrelevant. All directory paths are coded into the scripts and double-checked at runtime. After running installastheme, you will need
to manually restart AfterStep for the changes to take place.
When making the themes, you simply run makeastheme with the --theme <theme_name> argument and any of the other command line arguments you
might want to use. This script will grab all the config files necessary and all images specified within those config files. It then cre-
ates the theme in your '~/.afterstep/desktop/themes'
--theme
this option is used to specify the theme to install. With installastheme it is mandatory. With makeastheme if unspecified, the
$USER environmental variable will be used instead.
--no_wharf, --no_pager, --no_winlist, --no_background
Each of these options tell the scripts to skip processing for each of these modules. For makeastheme it is similar to saying, "I
don't have anything interesting in this module, don't store those options in the theme." For installastheme it is similar to say-
ing, "I really like my <module>, don't change any settings in there."
SEE ALSO afterstep(1x), Pager(1x), Wharf(1x), WinList(1x),
/usr/share/doc/afterstep/README.theme.handler.gz .
AUTHORS
These tools were written by Lathi <alcornd@earthlink.net>.
This manual page was written by Robert Luberda <robert@debian.org>, based on the README.theme.handler file, for the Debian GNU/Linux system
(but may be used by others).
BUGS
If you find any, you can email me (mailto:alcornd@earthlink.net) or the AfterStep mailing list (mailto:afterstep@linuxcenter.com). Alter-
natively, you can also probably find me on EfNet channel #afterstep as Lathi.
Feb 10th, 2008 MAKEASTHEME(1x)