Sponsored Content
Top Forums Shell Programming and Scripting On how to select the right tool for a given task Post 302248627 by cfajohnson on Saturday 18th of October 2008 07:29:12 PM
Old 10-18-2008
Quote:
Originally Posted by bakunin
This is all true, but not the point: cfajohnson claimed that sed is (or should be used) only for files. I challenged that claim by citing that using sed in a pipeline would be a counterexample for an equally sensible use of sed.

My point is that sed (or any external command) should not be used to chop a single string, even if it means several instructions where a single regex and an external program would have done the job. You can execute many shell statements in the time it takes to call an external command.

In a pipeline, where multiline input is coming from other commands, and not from the echoing of a single string, sed is fine.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

process vs task

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)
Discussion started by: hana
2 Replies

2. Shell Programming and Scripting

comment and Uncomment single task out of multiple task

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)
Discussion started by: madhusmita
9 Replies

3. Shell Programming and Scripting

Parse an XML task list to create each task.xml file

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)
Discussion started by: MissI
3 Replies

4. Programming

Help with task daemon

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)
Discussion started by: james2432
5 Replies

5. Boot Loaders

Reboot and Select Proper Boot device or insert Boot media in select Boot device and press a key

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)
Discussion started by: rpf
0 Replies

6. Shell Programming and Scripting

last task for my script

hi, infile- create table salary ( occupation_code char(40), earnings decimal(10,2), occ_yearend integer ); outfile- salary:create table salary salary:( occupation_code char(40), salary: earnings decimal(10,2), salary: occ_yearend integer salary:); Thanks. (4 Replies)
Discussion started by: dvah
4 Replies

7. Shell Programming and Scripting

task

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)
Discussion started by: hernand
10 Replies

8. Shell Programming and Scripting

Task

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)
Discussion started by: hernand
29 Replies

9. Homework & Coursework Questions

[HELP] Easy task

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
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)
All times are GMT -4. The time now is 07:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy