Sponsored Content
Full Discussion: Stupid find trick
Top Forums Shell Programming and Scripting Stupid find trick Post 32069 by criglerj on Monday 18th of November 2002 12:52:08 PM
Old 11-18-2002
Quote:
Originally posted by Neo
For more complex shell scripts, I suggest you use either PHP or PERL. You will have much more overall flexibility and capability. After using these more advanced shell, I rarely do anything in older shells anymore, except very simple scripts (and even the more simple scripts are fun in PHP and PERL).
Six months ago, I would have written this in Perl or Ruby. But if you look at the part that does the work, it's only 4 lines long --- 8 if you count the subservient ls/awk script --- which doesn't qualify as "more complex" in my mind. I guess I could use find2perl to prototype the Perl expressions I'm interested in, though ISTR you take about a 20% performance hit by going through Perl (not a big deal here).

FWIW, I save the output from this program, then from vi I execute another script that picks out the source file I want and prints its full path, as in
Code:
:e `findfile zzz.c`

It took me a while to understand what the vi intro doc meant when it said that arguments to ":e" are passed to the shell for expansion before trying to edit the file. But I think I've got it now ...
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trick to ignore space in folder name

Hello All, I am getting error while passing a folder name that has space to the cmd line argument. sh log_delete2.sh "/home/kumarpua/TESTARTIFACTS/atf-chix/ATF-subversion-dev/ssenglogs/A RM" log_delete2.sh: line 17: cd: /home/kumarpua/TESTARTIFACTS/atf-chix/ATF-subversion-dev/ssenglogs/A:... (3 Replies)
Discussion started by: pulkit
3 Replies

2. Shell Programming and Scripting

stupid find question

I issue find . -name "file.sh" I get tons of find: cannot read dir how do I filter out the errors and just get back tbhe results of the search? (1 Reply)
Discussion started by: guessingo
1 Replies

3. Shell Programming and Scripting

Any trick to speed up script?

Hi Guys, I have a script that I am using to convert some text files to xls files. I create multiple temp. files in the process of conversion. Other than reducing the temp. files, are there any general tricks to help speed up the script? I am running it in the bash shell. Thanks. (6 Replies)
Discussion started by: npatwardhan
6 Replies

4. UNIX for Dummies Questions & Answers

A trick to avoid ESC in vim

Hello, I find a trick to avoid pressing ESC without key-maping in vim. I am pleasure using this method, because ALT key is very comfortble for thumb to press. What's the trick? the ALT key. When you are in INSERT mod, press ALT+l switch to COMMAND mod without... (2 Replies)
Discussion started by: vistastar
2 Replies

5. UNIX for Dummies Questions & Answers

alternative to the grep trick

Hi, We used to use the below commands often. ps -ef|grep bc ps -ef|grep abc|grep -v grep Both fairly returns the same result. For example, the process name is dynamic and we are having the process name in a variable, how we can apply the above trick. For example "a" is the... (11 Replies)
Discussion started by: pandeesh
11 Replies

6. Programming

Oracle TRICk Question

HI Guys , Below are the two columns ITEMS and STATE of table . ITEMS STATE '2345','ggdh','k5tg','dgyt','hFF' DF '1234','ghyt','DDD','GHTD','ABF' PQ Can we get output in PL/SQL in below way ?... (7 Replies)
Discussion started by: Perlbaby
7 Replies

7. UNIX for Beginners Questions & Answers

UNIX trick or command

Hi, Is there any command to do this -- Input is -- Ant Bat Cat Dog Output is -- A_Ant B_Ant A_Bat B_Bat A_Cat B_Cat A_Dog B_Dog (12 Replies)
Discussion started by: Indra2011
12 Replies
SHAPE_STDVAR(7) 					 Miscellaneous Information Manual					   SHAPE_STDVAR(7)

NAME
shape_stdvar - shapeTools RMS project wide variant definitions DESCRIPTION
This file contains common variant definitions to be used in a software development project supported by the shape release management sys- tem. The stdvar file defines a variant raster for a whole development project. This central definition facility unifies the naming and semantics of supported system variants. Stdvar is to be included into the Shapefiles of any part of the developed system via shape's include mechanism. The definitions in stdvar should be carefully designed and maintained for each supported project. They usually concern variant control for all hardware/operating system platforms to be supported or variant settings to produce different qualities of generated code (debug or optimized). Enclosed in the shapeTools distribution, you find the stdvar file used in the development of the shape toolkit itself. This may be a good starting point for developing an own variant raster. At least, it helps you learning the definition syntax. Otherwise, for a description on the syntax of variant definition parts see the shape(1) manual. FILES
$(SHAPELIBPATH)/stdvar SEE ALSO
shape_RMS(1), shape (1) 1.6.119 SHAPE_STDVAR(7)
All times are GMT -4. The time now is 11:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy