Sponsored Content
Top Forums UNIX for Advanced & Expert Users Performing Script on Multiple Files Post 302186046 by drl on Wednesday 16th of April 2008 10:42:42 AM
Old 04-16-2008
Hi.

The order of the files produced by the shell may not be what you expect, so use caution if the order is important. For example:
Code:
#!/bin/bash3 -

# @(#) s1       Demonstrate list sequence from shell for numeric sub-strings.

echo
echo "(Versions displayed with local utility \"version\")"
version >/dev/null 2>&1 && version =o $(_eat $0 $1)
echo

# Manufacture the list, and remove previous debris.
LIST=$( printf "t%d " {5..12} )
rm -f $LIST

# Create the files.
touch $LIST

echo ' Results from echo t*:'
echo t*

exit 0

Producing:
Code:
% ./s1

(Versions displayed with local utility "version")
Linux 2.6.11-x1
GNU bash 3.00.16(1)-release

 Results from echo t*:
t10 t11 t12 t5 t6 t7 t8 t9

Best wishes ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

What are core files and how can I delete them when am performing system maintenance??

Help me How can I go about doing this. also, if you have any idea of other files I can delete and what I can do to improve the performance of a system thats running too slow (6 Replies)
Discussion started by: IMPORTANT
6 Replies

2. Shell Programming and Scripting

taking count of log files and den performing some actions

hi, I've some log files in a path /SYSTEM/custom/data/MNP/xmlerror as: MNP_PORT_IN_P200902191347563283_20090220181630_err_1.xml MNP_PORT_IN_P200902171717114365_20090220211814_err_2.xml MNP_PORT_IN_P200902191349023233_20090220181923_err_1.xml... (4 Replies)
Discussion started by: ss_ss
4 Replies

3. Shell Programming and Scripting

Performing fast searching operations with a bash script

Hi, Here is a tough requirement , to be served by bash script. I want to perform 3,00,000 * 10,000 searches. i.e. I have 10,000 doc files and 3,00,000 html files in the file-system. I want to check, which of the doc files are referred in any html files. (ex- <a href="abc.doc">abc</a>)... (3 Replies)
Discussion started by: jitendriya.dash
3 Replies

4. Shell Programming and Scripting

Performing remote operations in a script

I have a scropt that looks something like this: #!/bin/bash ssh user@domain1.com sleep 10 some_command exit ssh different_user@domain2.com sleep 10 some_command exit However, the script is not logging into those accounts and doing the actions. The accounts are configured in my... (3 Replies)
Discussion started by: dotancohen
3 Replies

5. Shell Programming and Scripting

Reading the data from CSV and performing search through shell script

Hello, I am working on building a script that does the below actions together in my Linux server. 1) First, have to read the list of strings mentioned in CSV and store it in the shell script 2) Second, pick one by one from the string list, and search a particular folder for files that... (2 Replies)
Discussion started by: vikrams
2 Replies

6. Shell Programming and Scripting

Script to find & replace a multiple lines string across multiple php files and subdirectories

Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ? The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories. So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Discussion started by: spfc_dmt
12 Replies

7. Programming

Performing a while for two files

Hi, This is for Perl. I have a while loop, and would like to process two files, the formats are given below : access access.<previousday>-* How can perform a while loop on both logs, while creating the logic for access.<previousday>-* to get format like "access.20130615-124139" when... (11 Replies)
Discussion started by: susankoperna1
11 Replies

8. UNIX for Dummies Questions & Answers

Run one script on multiple files and print out multiple files.

How can I run the following command on multiple files and print out the corresponding multiple files. perl script.pl genome.gff 1.txt > 1.gff However, there are multiples files of 1.txt, from 1----100.txt Thank you so much. No duplicate posting! Continue here. (0 Replies)
Discussion started by: grace_shen
0 Replies

9. Shell Programming and Scripting

Run one script on multiple files and print out multiple files.

How can I Run one script on multiple files and print out multiple files. FOR EXAMPLE i want to run script.pl on 100 files named 1.txt ....100.txt under same directory and print out corresponding file 1.gff ....100.gff.THANKS (4 Replies)
Discussion started by: grace_shen
4 Replies

10. Shell Programming and Scripting

Renaming multiple files in sftp server in a get files script

Hi, In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this? I am using #!/bin/ksh For eg: sftp user@host <<EOF cd /path get *.txt rename *.txt *.txt.done ... (7 Replies)
Discussion started by: jhilmil
7 Replies
ABL(1)							     cao-vlsi reference manual							    ABL(1)

NAME
abl - Prefixed representation for boolean functions ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr DESCRIPTION
libablmmm.a is a library that enables to represent a boolean function in a LISP-like form. An ABL is a prefixed internal representation for a boolean function having standard operators as OR,NOR,NAND,XOR,NOT and AND. An ABL is only made up of doublets. A doublet is composed of two fields wich are accessible by the functionnal #define CAR and CDR. A doublet is implemented with a MBK chain_list. Expression is the generic term for a boolean function represented by an ABL. An expression can be an atomic expression or an operator expression. The function f = a is represented by an atomic expression whereas f = (or a b) is represented by an operator expression. An atomic expression is made up of a single doublet having the NEXT pointer equal to NULL and DATA pointer equal to the identifier pointer. A constant atomic expression is an atomic expression having the string "'0'" or "'1'" as identifier. An operator expression is more complicated than an atomic expression. It's a list of items, the first item is the head operator of the expression and the following items are the arguments of the expression. It's possible to go trough the arguments by calling the functionnal #define CDR. Then each argument is accessible by the functionnal #define CAR. An argument can be recursively an atomic or an operator expression. The arity of an operator expression is the number of arguments of the first level. Functions are divided into two groups, the low level functions are written with #define and are used to manage the ABL internal form, the high level functions are used to manage the boolean expressions. All functions are defined in the file "prefbib.c" (#define in "logmmm.h"). Functionnal #define ATOM - checks the kind of an expression (atomic or operator expression). CAR - returns the DATA pointer of a doublet. CADR - returns the DATA pointer of the NEXT pointer of a doublet. CDR - returns the NEXT pointer of a doublet. OPER - returns the operator number of an operator expression. VALUE_ATOM - returns the associated char * of an atomic expression. Functions and procedures addHExpr - adds a new arguments at the head of an operator expression. addQExpr - adds a new arguments at the queue of an operator expression. anyExpr - returns the value of a logical OR applied on the results of the application of a function on the arguments of an operator expression. changeOperExpr - changes the operator of the head of an expression. charToOper - converts an operator string into an operator number. copyExpr - copies an expression. createAtom - creates an atomic expression. createBinExpr - creates a binary operator expression with an eventual merging of the operator. createExpr - creates the head of an operator expression. deleteNumExpr - removes the i-th argument in an operator expression. devXor2Expr - converts XOR 2 to OR-AND. devXorExpr - removes XOR in an expression. displayExpr - displays an expression in a prefixed notation. displayInfExpr - displays an expression in infixed notation. equalExpr - checks that two expressions are strictly equal. equalVarExpr - checks that two expressions are syntactically equal. everyExpr - returns the value of a logical AND applied on the results of the application of a function on the arguments of an operator expression. exprToChar - converts an expression into a string. charToExpr - converts a string into an expression. flatArityExpr - flattens the operators of an expression. flatPolarityExpr - translates the inverters of an expression to the level of atomic expressions. freeExpr - frees an expression. identExpr - gives an identifier from an operator expression. lengthExpr - returns the number of arguments in an expression. mapCarExpr - creates a new expression by applying a function to all arguments of an operator expression. mapExpr - applies a procedure to all the arguments of an operator expression. maxExpr - returns the highest argument of an operator expression. minExpr - returns the lowest argument of an operator expression. normExpr - normalizes an expression. notExpr - complements an expression and eventually does a simplification. numberAtomExpr - returns the number of atoms in an expression. numberOccExpr - returns the number of time an atom appears in an expression. numberOperBinExpr - returns the number of equivalent binary operators in an expression. operToChar - converts an operator number into an operator string. profExpr - returns the depth of an expression. profAOExpr - returns the depth of an expression without taking the inverters into account. searchExpr - searches for a specific atom in an expression. searchNumExpr - fetches the i-th argument in an operator expression. searchOperExpr - searches for an operator in an expression. simplif10Expr - makes simplifications on an expression including constant atomic expressions. simplifNotExpr - makes simplifications on an expression including inverters. sortExpr - sorts an expression. substExpr - copies an expression by substituting a given atom by an expression. substPhyExpr - substitutes an atomic expression by an expression within an expression. supportChain_listExpr - returns the support of an expression in a chain_list. supportPtype_listExpr - returns the support of an expression in a ptype_list. wPMExpr - returns 1 if the pattern matching is possible between two expressions. SEE ALSO
log(1), mbk(1), addHExpr(3), addQExpr(3), anyExpr(3), changeOperExpr(3), charToExpr(3), charToOper(3), copyExpr(3), createAtom(3), create- BinExpr(3), createExpr(3), deleteNumExpr(3), devXor2Expr(3), devXorExpr(3), displayExpr(3), displayInfExpr(3), equalExpr(3), equalVar- Expr(3), everyExpr(3), exprToChar(3), flatArityExpr(3), flatPolarityExpr(3), freeExpr(3), identExpr(3), lengthExpr(3), mapCarExpr(3), map- Expr(3), maxExpr(3), minExpr(3), notExpr(3), normExpr(3), numberAtomExpr(3), numberOccExpr(3), numberOperBinExpr(3), operToChar(3), prof- Expr(3), profAOExpr(3), searchExpr(3), searchNumExpr(3), searchOperExpr(3), simplif10Expr(3), simplifNotExpr(3), sortExpr(3), substExpr(3), substPhyExpr(3), supportChain_listExpr(3), supportPtype_listExpr(3). PMExpr(3). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 ABL(1)
All times are GMT -4. The time now is 08:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy