Sponsored Content
Top Forums Shell Programming and Scripting Help me pls : splitting single file in unix into different files based on data Post 302712223 by Ravindra Swan on Tuesday 9th of October 2012 02:00:50 AM
Old 10-09-2012
Code:
{30001002|XXparameter|!prototype_path|C:\\gui\\src\\mpc\\Sort-Merge\\Sort.mpc|3|2|Pw$|@{0|}}
{30001002|XXparameter|!prototype_path|C:\\gui\\src\\mpc\\Partition\\Hash.mpc|3|2|Pw$|@{0|}}

These two are also getting generated with other files which is not required
Bcz these are sub components of a main component, so can we make 'Abi initio' also as another searching criteria and name of the file as specified above is good.

Thanks in advance.

Last edited by Scott; 10-09-2012 at 05:09 AM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

splitting files based on text in the file

I need to split a file based on certain context inside the file. Is there a unix command that can do this? I have looked into split and csplit but it does not seem like those would work because I need to split this file based on certain text. The file has multiple records and I need to split this... (1 Reply)
Discussion started by: matrix1067
1 Replies

2. Shell Programming and Scripting

Splitting large file into multiple files in unix based on pattern

I need to write a shell script for below scenario My input file has data in format: qwerty0101TWE 12345 01022005 01022005 datainala alanfernanded 26 qwerty0101mXZ 12349 01022005 06022008 datainalb johngalilo 28 qwerty0101TWE 12342 01022005 07022009 datainalc hitalbert 43 qwerty0101CFG 12345... (19 Replies)
Discussion started by: jimmy12
19 Replies

3. Shell Programming and Scripting

Data Splitting into two files from one file

I have a file as: I/P File: Ground Car 2009 Lib 2008 Lib 2003 Ground Car 2009 Ground Car 2003 Car 2005 Car 2003 Car 2005 Sita 2900 2006 Car 2007 I have to split the file into two: - one for names and second for years. O/p1 (Names): Ground Car (3 Replies)
Discussion started by: karumudi7
3 Replies

4. Shell Programming and Scripting

Splitting single file into n files

Hi all, I am new to scripting and I have a requirement we have source file as HEADER 01.10.2010 14:32:37 NAYA TA0022 TA0000 20000001;20060612;99991231;K4;02;3 20000008;20080624;99991231;K4;02;3 20000026;19840724;99991231;KK;01;3 20000027;19840724;99991231;KK;01;3... (6 Replies)
Discussion started by: srk409
6 Replies

5. Shell Programming and Scripting

Urgent ...pls Sorting files based on timestamp and picking the latest file

Hi Friends, Newbie to shell scripting. Currently i have used the below to sort data based on filenames and datestamp $ printf '%s\n' *.dat* | sort -t. -k3,4 filename_1.dat.20120430.Z filename_2.dat.20120430.Z filename_3.dat.20120430.Z filename_1.dat.20120501.Z filename_2.dat.20120501.Z... (1 Reply)
Discussion started by: robertbrown624
1 Replies

6. Shell Programming and Scripting

Sed: Splitting A large File into smaller files based on recursive Regular Expression match

I will simplify the explaination a bit, I need to parse through a 87m file - I have a single text file in the form of : <NAME>house........ SOMETEXT SOMETEXT SOMETEXT . . . . </script> MORETEXT MORETEXT . . . (6 Replies)
Discussion started by: sumguy
6 Replies

7. UNIX for Dummies Questions & Answers

Extracting data from one file, based on another file (splitting)

Dear All, I have two files but want to extract data from one based on another... can you please help me file 1 David Tom Ellen and file 2 David|0010|testnamez|resultsz David|0004|testnamex|resultsx Tom|0010|testnamez|resultsz Tom|0004|testnamex|resultsx Ellen|0010|testnamez|resultsz... (12 Replies)
Discussion started by: A-V
12 Replies

8. Shell Programming and Scripting

Splitting a single file to multiple files

Hi Friends , Please guide me with the code to extract multiple files from one file . The File Looks like ( Suppose a file has 2 tables list ,column length may vary ) H..- > File Header.... H....- >Table 1 Header.... D....- > Table 1 Data.... T....- >Table 1 Trailer.... H..-> Table 2... (1 Reply)
Discussion started by: AspiringD
1 Replies

9. Shell Programming and Scripting

Split a single file into multiple files based on a value.

Hi All, I have the sales_data.csv file in the directory as below. SDDCCR; SOM ; MD6546474777 ;05-JAN-16 ABC ; KIRAN ; CB789 ;04-JAN-16 ABC ; RAMANA; KS566767477747 ;06-JAN-16 ABC ; KAMESH; A33535335 ;04-JAN-16 SDDCCR; DINESH; GD6674474747 ;08-JAN-16... (4 Replies)
Discussion started by: ROCK_PLSQL
4 Replies

10. Shell Programming and Scripting

In PErl script: need to read the data one file and generate multiple files based on the data

We have the data looks like below in a log file. I want to generat files based on the string between two hash(#) symbol like below Source: #ext1#test1.tale2 drop #ext1#test11.tale21 drop #ext1#test123.tale21 drop #ext2#test1.tale21 drop #ext2#test12.tale21 drop #ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies
MPC(1)							      General Commands Manual							    MPC(1)

NAME
mpc-ace, mwc-ace -- generate project and workspace files SYNOPSIS
mpc-ace [OPTION ...] [FILE ...] mwc-ace [OPTION ...] [FILE ...] DESCRIPTION
mpc-ace and mwc-ace, the Makefile, Project and Workspace Creator generate platform and compiler specific files to automate the compilation process (e.g. GNUmakefile and Makefile.am). The most common way to use the Make Project Creator is to run the workspace generator (mwc-ace). This script will generate projects and a single workspace that contains the generated projects. If no input FILE (.mwc file) is specified, it will recurse into the directory in which the script was started. It looks for .mpc files and generates a project or projects for each one found. Most of what is stated about mwc-ace applies to mpc-ace except that it only generates projects. If an input FILE (.mpc file) is not pro- vided, the project creator will attempt to create a default project in the directory from which the script was started. -global file specifies the global input file. Values stored within this file are applied to all projects. If not specified, defaults to con- fig/global.mpb -include directory specifies a directory to search when looking for base projects, template input files and templates. This option can be used mul- tiple times to add directories. Two include directories are used by default (config and templates) -recurse recurse from the current directory and generate from all found input files. -ti dll | lib | dll_exe | lib_exe:file specifies the template input file (with no extension) for the specific type, e.g. -ti dll_exe:vc8exe. Each project creator has a default template input file for each type of project (dll_exe, lib_exe, dll, lib). You can override the default template input file name with the -ti option. The file must have a mpt extension and must reside within the include search directories. NOTE: the lib and the lib_exe template input files are only used when MPC is generating static projects -hierarchy generate a workspace in a hierarchical fashion. Forces the generation of a hierarchical workspace at each directory level in between the toplevel directory and the location of the .mpc file that is being processed. This is the default for make based workspace creators. NOTE: This option has no effect when when used with mpc-ace -template file specifies the template name (with no extension). file should have a .mpd extension and sit in one of the include search directo- ries. NOTE: The -template option overrides the template file for all types specified -relative name=var any $() variable in an mpc file that is matched to name is replaced by var only if var can be made into a relative path based on the current working directory -base project add project as a base project to each generated project file. Do not provide a file extension, the .mpb extension will be tried first; if that fails the .mpc extension will be tried -nocomments do not place comments in the generated files -noreldefs do not try to generate default relative definitions for *_ROOT, which come from environment variables -notoplevel do not generate the top level target file. Files are still processed, but no top level file is created. For mwc-ace, it says process all projects for a workspace, but do not generate the top level workspace file. For mpc-ace, it says process the .mpc files, but do not generate the project files -static specifies that only static projects are generated. By default, only dynamic projects will be generated. This parameter was pre- viously -static_only. Currently, mpc-ace only supports generating dynamic projects or static projects, but not both during the same run. To generate them both you must run mpc-ace twice, once with the -static option and once without. Additionally, the vc6, em3, vc7, vc71 and vc8 project names will no longer automatically have _Static appended to the project name when generating static projects. This can still be achieved by using the -name_modifier option. When generating static projects, inter-project dependencies will not be generated for libraries within vc6, em3, vc7, and vc71 workspaces. The reason is due to the fact that each static library that depended upon another would be combined at the library creation stage, resulting in extremely large libraries. Dependencies are handled correctly by vc8 and later. This behavior can be modified by setting the MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY environment variable. It will force mpc-ace to generate inter- project dependencies for libraries within a single workspace -genins generate .ins files after processing each project that can be used in conjunction with the prj_install.pl script to install dif- ferent parts of the project (such as header files) into an alternate location -use_env use environment variables for all uses of $() instead of the relative replacement values -value_template name+=val | name=val | name-=val this option allows modification of a template input name pair. Use += to add val to the name's value. Use -= to subtract and = to override the value. If a template variable value will contain spaces, it is best to enclose the whole setting in double quotes and use single quotes within the value to retain spaces (if it is necessary) -value_project name+=val | name=val | name-=val this option allows modification of a project variable assignment. Use += to add val to the name's value. Use -= to subtract and = to override the value. This can be used to introduce new name value pairs to a project. However, it must be a valid project assignment -make_coexistence if multiple make based project types are generated, they will be named such that they can coexist -feature_file file specifies the features file to read before processing. These feature names can be anything, but they should correspond to values used for the requires and avoids keywords. If a feature is required and is not enabled then the project will not be created. If a feature is to be avoided and it is enabled then the project will not be created. The default feature file is default.features under the config directory -expand_vars perform direct expansion, instead of performing relative replacement with either -use_env or -relative options -features features specifies the feature list to set before processing. Values specified by this option overwrite values from features files, e.g. -features "qos=1,ssl=0" -gendot generate .dot files for use with Graphvis. This option, which is only useful with mwc-ace, will result in the generation of .dot files for each workspace processed. Each .dot file will contain information that can be fed to Graphvis to display the depen- dency information for the various projects found within the workspace. -exclude directories use this option to exclude directories or files when searching for input files. NOTE: This option has no effect when used with mpc-ace -name_modifier pattern modify generated workspace or project names. The pattern passed to this parameter will have the * portion replaced with the actual output name. For example -name_modifier '*_Static' will result in all workspace and project names ending in _Static, e.g. FOO_Static.dsw and FOO_Static.dsp -apply_project when used in conjunction with -name_modifier, it applies the name modifier to the project name also. NOTE: this option has no effect without the -name_modifier option -version print the MPC version and exit -into directory place all output files in a mirrored directory structure starting at directory -gfeature_file file specifies the global feature file. The default value is global.features under the config directory -language cplusplus | csharp | java | vb specify the language preference. The default is cplusplus -type automake | bcb2007 | bcb2009 | bds4 | bmake | cc | em3 | ghs | html | make | nmake | sle | vc6 | vc7 | vc71 | vc8 | vc9 | vc10 | wb26 specifies the type of project file to generate. This option can be used multiple times to generate multiple types. There is no longer a default. NOTE: The -ti option overrides the template input file for all types specified MPC Codebase Configuration File This configuration file can be used to specify alternate locations for the MPC Configuration File. If a base.cfg is found underneath the 'config' directory where MPC is executed, it will be read to determine the location of MPC.cfg based on the directory in which MPC was started. For example, if $MPC_ROOT/mwc-ace is run under /foo/bar_root/src and $MPC_ROOT/config/base.cfg contained: /foo/bar_root = /foo/bar_root/MPC/config MPC would attempt to open and read /foo/bar_root/MPC/config/MPC.cfg as the MPC Configuration File. If the base configuration file is not present, MPC will try to use $MPC_ROOT/config/MPC.cfg as the MPC Configuration File. You may reference environment variables, accessed by $NAME, on either side of the equals sign. MPC Configuration File In an effort to move away from the use of environment variables, a configuration file has been introduced. The configuration file (MPC.cfg) can contain settings to provide command line options, control logging and direct MPC to dynamic project types. The following keywords are allowed in the configuration file, which will be read from the 'config' directory of MPC. command_line provide additional command line options to MPC. The value of this setting will be prepended to the options passed to mwc-ace or mpc-ace default_type provide a single project type (as specified by the -type option) as the default project type dynamic_types this comma separated list points to directories in which MPC will search for Perl modules to implement additional MPC project types, base projects or template files. This setting can be used to augment or replace functionality in MPC. For each suitable directory found, it will add a modules include path for Perl to find modules, add a config include path to locate base projects and a template include path to find MPC templates. includes similar to the -include command line option, it adds the list of comma separated paths to the MPC include search paths. logging if this setting contains info=1, informational messages will be printed. If it contains warn=1, warning messages will be printed. If it contains diag=1, diagnostic messages will be printed. If it contains debug=1, debug messages will be printed. And lastly, if it contains detail=1, detail messages will be printed. If it contains none of these, mpc-ace will not print out any information or warnings when processing projects or workspaces. Errors are always printed if any are encountered. verbose_ordering if this is set, mwc-ace will warn the user about references to projects in the after keyword that have not been processed ENVIRONMENT VARIABLES The following environment variable could affect mwc-ace and mpc-ace: MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY see the help on -static parameter above MPC_GHS_UNIX this environment variable is only meaningful when generating the ghs project files. By default, the ghs type assumes that it is for Windows. If this is not the case, set this environment variable prior to running MPC MPC(1)
All times are GMT -4. The time now is 06:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy