Sponsored Content
Homework and Emergencies Homework & Coursework Questions Creating a new file that is composed of other contents Post 302361708 by pludi on Wednesday 14th of October 2009 01:25:32 AM
Old 10-14-2009
To merge 2 files, you will have to concatenate them.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating file contents using contents of another file

Hi, I am not sure how to start doing this so I hope to get some advice as to how to start. I have 2 files. The source file contains data that I needed is in columns delimited by ";". For example, in this format: "CONTINENT","COUNTRY","CITY","ID" "asia","japan","tokyo","123"... (21 Replies)
Discussion started by: ReV
21 Replies

2. UNIX for Dummies Questions & Answers

compare 2 file contents , if same delete 2nd file contents

Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents..... I try with "diff"...... but confusion how to use "diff" with if ---else Thanking you (5 Replies)
Discussion started by: krishnampkkm
5 Replies

3. Shell Programming and Scripting

Perl help: Creating a multidimensional array of subdirectories and its contents

I'm currently working with dozens of FASTA files, and I'm tired of having to manually change the filename in my Perl script. I'm trying to write a simple Perl script that'll create a 2-dimensional array containing the name of the folders and its contents. For example, I would like the output... (6 Replies)
Discussion started by: shwang3
6 Replies

4. Shell Programming and Scripting

I want to delete the contents of a file which are matching with contents of other file

Hi, I want to delete the contents of a file which are matching with contents of other file in shell scripting. Ex. file1 sheel,sumit,1,2,3,4,5,6,7,8 sumit,rana,2,3,4,5,6,7,8,9 grade,pass,2,3,4,5,6,232,1,1 name,sur,33,1,4,12,3,5,6,8 sheel,pass,2,3,4,5,6,232,1,1 File2... (3 Replies)
Discussion started by: ranasheel2000
3 Replies

5. Shell Programming and Scripting

Replace partial contents of file with contents read from other file

Hi, I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file. i am able to... (2 Replies)
Discussion started by: seeki
2 Replies

6. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

7. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies

8. Shell Programming and Scripting

ksh Script, Reading A File, Grepping A File Contents In Another File

So I'm stumped. First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes. I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies

9. UNIX for Beginners Questions & Answers

Output file name and file contents of multiple files to a single file

I am trying to consolidate multiple information files (<hostname>.Linux.nfslist) into one file so that I can import it into Excel. I can get the file contents with cat *Linux.nfslist >> nfslist.txt. I need each line prefaced with the hostname. I am unsure how to do this. --- Post updated at... (5 Replies)
Discussion started by: Kentlee65
5 Replies
fstadm(1M)																fstadm(1M)

NAME
fstadm - defines and manages file system stack templates SYNOPSIS
filename name] template_name template_name template_name DESCRIPTION
The command performs basic administrative operations on file system stack templates. Operations include creating and deleting templates, listing all templates on the system, and displaying the contents of templates. File system stack templates are used to describe the structure of a file system module stack. They contain information about the modules on a stack and the mount options for each module on the stack. All stack templates on a system reside in the system's stack template database. The only supported way to access and edit templates in the system template database is to use the command. The command also validates all templates at the time that they are created, to make sure that any dependency and compatibility constraints for modules on a stack are not violated. Dependency and compatibility constraints are specified by individual module developers, and enforces the constraints as needed. Note that end users do not need to be concerned about what constraints exist and how they are implemented: they only need to use to create all their templates, and will report on any problems with a user's proposed stack template. It is then easy to modify the inputs to to build a correctly validated template. Once a stack template is created and exists in the system template database, it can be used at mount time by specifying its name as a mount option. For example, the command below will mount the desired file system, with a stack described by template built above it. The file system on will now have the features of plus those of all of the modules on the stack described by Note that templates do not include information about the base file system to be mounted (e.g. or so the base file system must still be specified on the command line in the traditional way. (Support for templates that include base file systems is not included in the current versions of HP-UX.) can be invoked only by a user who has appropriate privileges. The behavior of the command depends upon the command name keyword specified as the first operand. Command Keywords and Options The following command keywords, arguments, and options are currently supported. Creates a new template. To describe a template, this command takes two types of input: o a text file that describes a template, specified with the option, or o a string that describes a template directly in the command line, specified with the option. The option cannot be used in conjunction with the option. A template can contain information about the mount options to use at each level of a stack. For information about the specific mount options that are available for each stackable file system module, consult the manpage for the module itself. The command uses the information in its input to validate and build a new template. If the new template's structure fails valida- tion, this command will abort and print an error message describing the problem. If validation succeeds, this command will create the template in the system template database and make it available for use with future mounts. The arguments that can be used with the keyword are: Specifies the name of a text file that describes the contents of a stack template. Information in the text file will be used as a guide to construct the desired stack template. The format of each line in the text file is: That is, each line of the text file describes one level of the desired stack. Within each line, a module and its mount options are separated by a single space character. The first line of the file represents the top of the stack, and the last line of the file represents the bottom. The format of these text files is identical to that of the output of the command key- word. Specifies the contents of a stack template. The format for this string is: That is, an entire stack is described within the string, and each level of a stack is separated by a semicolon Within a level, a module and its mount options are separated by a colon (But the colon does not need to be included for modules without mount options.) The leftmost module in the string represents the top of the stack, and the right-most module represents the bottom of the stack. Specifies the name of the template to be created. The maximum supported length for the template name is 128 characters. This is a required argument whenever is used. For if it is omitted, the name of the new template defaults to the name of the file specified with Overwrite option. If a template with the same name as the new template being created already exists, overwrites the old template. If this option is not specified, the command will fail whenever a template of the same name already exists. Note however that if a template of the same name exists AND is currently in use (in or the command will always fail, even if was specified. The rationale for this is that templates for stacks that are currently in use cannot be allowed to change. List all the templates in the system. This command displays the names of all templates currently stored in the system template database. Each template name is listed in its own line of output. Displays the contents of the specified template. This command will display the contents of the named template as text output, with each level of the stack described by one line of output. That is, each line of output will contain a module name, a space, and then the module's mount options (if any). The first line displayed represents the top of the stack, and the last line represents the bottom of the stack. Optionally, if it is redirected to a file, this output can also be used as input to via the option. Deletes the specified template from the system template database. If the template is currently in use (in or deletion is not allowed. In all other cases, the template will be removed from the sys- tem template database after user confirmation of the delete operation. (Template deletion is permanent and irrecoverable.) Forced delete of the specified template. Identical to but performs the deletion without asking for user confirmation. This command is provided for use by non-interactive scripts. Interactive help utility. Displays basic information about the various command keywords. RETURN VALUE
exits with one of the following values: Successful completion. An error condition occurred. Because is primarily an interactive command, an explanation of the error will be printed to standard error. EXAMPLES
List all the file system stack templates currently on the system: Display the contents of the stack template named Create a new template describing a stack that contains stacked modules named and (with module having a mount option set to 2), and name the template Delete the file system stack template named AUTHOR
was developed by HP. SEE ALSO
mount(1M). fstadm(1M)
All times are GMT -4. The time now is 04:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy