Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Searching for a pattern from filenames stored in a file Post 302581106 by zaxxon on Monday 12th of December 2011 05:15:10 AM
Old 12-12-2011
I think I understood, did you try it?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

searching for filenames with search strings in another file

Hi, I have 5 files in a directory. emp1_usage.txt emp2_usage.txt emp3_usage.txt emp4_usage.txt emp5_usage.txt I am using sqlldr to get the contents of the above 5 files and store it in a temp table and update my original table using temp table. for f in *emp*.txt do sqlldr... (3 Replies)
Discussion started by: pathanjalireddy
3 Replies

2. Shell Programming and Scripting

Searching words in a file containing a pattern

Hi all, I would like to print words in a file seperated by whitespaces containing a specific pattern like "=" e.g. I have a file1 containing strings like %cat file1 The= some= in wish= born <eof> .I want to display only those words containing = i.e The= , some=,wish= ... (5 Replies)
Discussion started by: sree_123
5 Replies

3. Shell Programming and Scripting

Searching a pattern in file and deleting th ewhole line containing the pattern

Hi All, Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern. #!bin/sh # The pattern that user want to add to the files echo "Enter the pattern of the redirect" read value # check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies

4. Shell Programming and Scripting

Searching a pattern in a file.

Hi Guys, I am writing a shell script to extract only the error message from a log file. I am having difficulty in searching the highlighted text in the below code. <runtimeinfo datetime="Sun Apr 04 20:02:52 EDT 2008" docid="" source="RAWDATA" event="ERROR"... (2 Replies)
Discussion started by: prash1986
2 Replies

5. UNIX for Dummies Questions & Answers

Searching the date pattern in a file

Hi, I would like to search the pattern based on the date like "2010/08/15". I tried using / in the file giving /<<pattern>>. when i tried this it turns to /2010/+8, but not going to the pattern what ever i want. This is how the data in the file. INFO | jvm 1 | 2010/05/26 13:30:33... (5 Replies)
Discussion started by: venkatesht
5 Replies

6. Shell Programming and Scripting

Searching for a pattern in a file...

The problem is similar to my yesterday post I Would like an awk script that does the following: I have a file (f1) that contains 1 2 3 4 5and another one (f2) that contains 8|a 9|b 0|c 1|d 2|e 3|f 4|g 5|h 6|i 7|jAnd I'd like to get this: 1|d 2|e 3|f 4|g (5 Replies)
Discussion started by: tukuyomi
5 Replies

7. UNIX for Dummies Questions & Answers

Capture filenames with a Pattern into another file

Hi i have a command in windows which captures the filenames with the same pattern and route it to another file. for example filetest_20110921, filetest_20110922,filetest_20110923 etc I would like to know the command in UNIX/LINUX for the same. The command which i am using in Windows is ... (12 Replies)
Discussion started by: mansurkhalil
12 Replies

8. Shell Programming and Scripting

Searching a string stored in other file

I need to design a script which can do the following: I have two files abc.txt and constant.hmtl abc.txt contains some 5 string that I need to see if they exist in contants.html. Constants.hmtl is a very large file around 800 lines. I want to search all the strings present in file... (8 Replies)
Discussion started by: hemasid
8 Replies

9. Shell Programming and Scripting

Want to Insert few lines which are stored in some file before a pattern in another file

Hello, I have few lines to be inserted in file_lines_to_insert. In another file final_file, I have to add lines from above file file_lines_to_insert before a particular pattern. e.g. $ cat file_lines_to_insert => contents are abc def lkj In another file final_file, before a... (6 Replies)
Discussion started by: nehashine
6 Replies

10. Shell Programming and Scripting

Search if file exists for a file pattern stored in array

Hi experts, I have two arrays one has the file paths to be searched in , and the other has the files to be serached.For eg searchfile.dat will have abc303 xyz123 i have to search for files that could be abc303*.dat or for that matter any extension . abc303*.dat.gz The following code... (2 Replies)
Discussion started by: 100bees
2 Replies
make2cook(1)						      General Commands Manual						      make2cook(1)

NAME
make2cook - translate makefiles into cookbooks SYNOPSIS
make2cook [ option... ][ infile [ outfile ]] make2cook -Help make2cook -VERSion DESCRIPTION
The make2cook program is used to translate Makefiles into cookbooks. This command is provided to ease the transition to using the cook command. If no input file is named, or the special name ``-'' is used, input will be taken from the standard input. If no output file is named, or the special name ``-'' is used, output will be taken from the standard output. SEMANTICS
There is no one-to-one semantic mapping between make semantics and cook semantics, so the results will probably need some manual editing. The functionality provided by classic make (1) implementations is accurately reproduced. Extensions, such as those offered by GNU Make or BSD make, are not always understood, or are sometimes not reproduced identically. The following subsections enumerate a few of the things which are understood and not understood. They are probably not complete. Understood The cook program requires variables to be defined before they are used, whereas make will default them to be empty. This is understood, and empty definitions are inserted as required. Most of the builtin variables of GNU Make are understood. Most of the builtin rules of classic make, GNU Make and BSD make are reproduced. For best results there should be a blank line after every rule, so that there can be no confusion where one rule ends and a new one begins. Builtin variables are defaulted from the environment, if an environment variable of the same name is set. The GNU Make override variable assignment is understood. The GNU Make ``+='' assignment is understood. The GNU Make ``:='' variable assignment is understood. Traditional make assignments are macros, they are expanded on use, rather than on assignment. The cook program has only variables. Assignment statements are re-arranged to ensure the correct results when variables are referenced. Single and double suffix rules are understood. The .SUFFIXES rules are understood and honoured. Hint: if you want to suppress the builtin-recipes, use a .SUFFIXES rule with no dependencies. The .PHONY rule is understood, and is translated into a set forced flag in appropriate recipes, except files from implicit recipes. The .PRECIOUS rule is understood, and is translated into a set precious flag in the appropriate recipes, except files from implicit recipes. The .DEFAULT rule is understood, and is translated into an implicit recipe. The .IGNORE rule is understood, and is translated into a set errok statement. The .SILENT rule is understood, and is translated into a set silent statement. Most GNU Make functions are understood. The filter and filter-out functions only understand a single pattern. The sort function does not remove duplicates (wrap the stringset function around it if you need this). The GNU Make static pattern rules are understood. They are translated into recipe predicates. The GNU Make and BSD make include variants are understood. The bizarre irregularities surrounding archive files in automatic variables and suffix rules are understood, and translated into consistent readable recipes. The make semantics are preserved. The BSD make .CURDIR variable is understood, and translated to an equivalent expression. It cannot be assigned to. The GNU Make and BSD make conditionals are understood, provided that they bracket whole segments of the makefile, and that these segments are syntactically valid. Cconditionals may also appear within rule body commands. Conditionals are not understood within the lines of a define. The GNU Make define is understood, but its use as a kind of ``function definition'' is not understood. The GNU Make export and unexport directives are understood. Not Understood The cook program tokenizes its input, whereas make does textual replacement. The shennanigans required to construct a make macro containing a single space are not understood. The translation will result in a cook variable which is empty. References to automatic variables within macro definitions will not work. The GNU Make foreach function is olny partially understood. This has no exact cook equivalent. The GNU Make origin function is not understood. This has no cook equivalent. The archive((member)) notation is not understood. These semantics are not available from cook. The MAKEFILES and MAKELEVEL variables are not translated, If you wish to reproduce this functionality, you must edit the output. The MAKEFLAGS and MFLAGS variables will be translated to use the Cook options function, which has a different range of values. Many variants of make can use builtin rules to make the Makefile if it is absent. Cook is unable to cook the cookbook if it is absent. Wildcards are not understood in rule targets, rule dependencies or include directives. If you want these, you will have to edit the output to use the [wildcard] function. Home directory tildes (~) are not understood in targets and dependencies. If you want this, you will have to edit the output to use the [home] function. The -lhome dependency is not understood to mean a library. If you want this, you will have to edit the output to use the [collect findlibs -lname] function. The .EXPORT_ALL_VARIABLES rule is not understood. This has no cook equivalent. OPTIONS
The following options are understood: -Help Provide some help with using the make2cook command. -Environment This option causes fragments to test for environment variables when performing the default settings for variables. (This corresponds to the make -e option.) -History_Commands This option causes make2cook to include recipes for RCS and SCCS in the output. -Line_Numbers Insert line number directives into the output, so that it is possible to tell where the lines came from. Most useful when debugging. make2cook program. -No_Internal_Rules This option may be used to supress all generation of recipes corresponding to make's internal rules. (This corresponds to the make -r option.) -VERSion Print the version of the make2cook program being executed. All other options will produce a diagnostic error. All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. For example: the arguments "-help", "-HEL" and "-h" are all interpreted to mean the -Help option. The argument "-hlp" will not be understood, because consecutive optional characters were not supplied. Options and other command line arguments may be mixed arbitrarily on the command line. The GNU long option names are understood. Since all option names for make2cook are long, this means ignoring the extra leading '-'. The "--option=value" convention is also understood. EXIT STATUS
The make2cook command will exit with a status of 1 on any error. The make2cook command will only exit with a status of 0 if there are no errors. COPYRIGHT
make2cook version 2.33 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Miller The make2cook program comes with ABSOLUTELY NO WARRANTY; for details use the 'make2cook -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'make2cook -VERSion License' command. AUTHOR
Peter Miller E-Mail: pmiller@opensource.org.au //* WWW: http://miller.emu.id.au/pmiller/ Reference Manual Cook make2cook(1)
All times are GMT -4. The time now is 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy