06-29-2006
Quote:
Originally Posted by marc
correct me if i am wrong......
cant we use a simple ">>" for merging the files
ex: cat file_2 >>file_1
You can. But the OP wanted file1, file2, file3, file4 to be merged into a single file. The resulting file should have a single line with 4 columns. The >> would merge it into 4 lines in the new file.
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Hi all
I've got MacOSX server which is a UNIX based system. I've got 2 partiontion an I like to make just one partition on he disk without loosing any data on part1. Is there a way to do that kind of thing in UNIX or do I have to format everything and put up the system again?
Thanx for reading... (3 Replies)
Discussion started by: gardarm
3 Replies
2. UNIX for Dummies Questions & Answers
Hi there,
I have 3 files and i want to take different fields from each file and combine them in one. I would like to ask if somebody tell me how can I refer to each field of the different files to write an awk command.
I mean can I do sth like
awk '........... print $1.file1 $3.file2}'... (1 Reply)
Discussion started by: sickboy
1 Replies
3. Shell Programming and Scripting
Would it be right forme to combine case statement and if else in one shell script? Would it work? (2 Replies)
Discussion started by: Pauline mugisha
2 Replies
4. Shell Programming and Scripting
Hello Group,
I have a file of data that contain
1
2
3
4
5
I request you help with a shell script for generate all posible combination of these numbers with the following output:
Example:
1 + 2 + 3 + 4 + 5 =
2 + 2 + 3 + 4 + 5 =
3 + 2 + 3 + 4 + 5 =
Thanks in advance.
Carlos (7 Replies)
Discussion started by: csierra
7 Replies
5. Shell Programming and Scripting
1)file1:
| *Local Communication Bandwidths (MB/Sec) | Memory copy (bcopy) |
| ^ | mmap_bandwidth |
| ^ | mmap_read bandwidth |
| ^ | memory write bandwidth |
| Local Communication Latencies | Pipe Latency |
2)file2
422.6903
1948.9000
... (9 Replies)
Discussion started by: yanglei_fage
9 Replies
6. Shell Programming and Scripting
Hi All,
bash-3.00$ gzgrep -i '\ ExecuteThread:' /******/******/******/******/stdout.log.txt.gz
<Jan 7, 2012 5:54:55 PM UTC> <Error> <WebLogicServer> <BEA-000337> < ExecuteThread: '414' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "696" seconds working on the request... (4 Replies)
Discussion started by: osmanux
4 Replies
7. Linux
hello,
i need a command like "bdf" of HP-UX. ( report number of free disk blocks (Berkeley version) ). it should report inode and file system usage in one line like bdf -i
manpage :
Man Page for bdf (all Section 1m) - The UNIX and Linux Forums
HP-UX command "" report inode and file... (2 Replies)
Discussion started by: bora99
2 Replies
8. Shell Programming and Scripting
I have a file1 like
prt1|als28.1 prt3|als53.1 prt2|als550.1 prt1|bls9.2 prt2|als7.2 prt2|bls0.2
prt2|als872.1 prt1|bls871.1 prt2|als6.2 prt4|als22.1 prt2|bls43.2
I want to create a file2 from this file by comparing all the possible combinations of patterns (prt) assuming prt1... (3 Replies)
Discussion started by: sammy777
3 Replies
9. UNIX for Dummies Questions & Answers
I have requirement to print latest record from file based on multiple columns combination.
EWAPE EW1SLE0000 EW1SOMU01 ABORTED 03/16/2015 100004 03/16/2015 100005 001
EWAPE EW1SLE0000 EW1SOMU01 ABORTED 03/18/2015 140003 03/18/2015 140004 001
EWAPE EW1SLE0000 EW1SOMU01 ABORTED 03/18/2015 220006... (1 Reply)
Discussion started by: tmalik79
1 Replies
10. Shell Programming and Scripting
I need to have a script read a file that has a list of words in a single column like below:Black
Blue
Brown
Orange
Red
Yellow
Green
White
Purple
Silver
Grey
Tan
Then print to another file just all of the two-word possible combinations. Example:
Black,Blue
Anyone want to take a... (4 Replies)
Discussion started by: vespasian
4 Replies
LEARN ABOUT DEBIAN
directory::scratch::structured
Directory::Scratch::Structured(3pm) User Contributed Perl Documentation Directory::Scratch::Structured(3pm)
NAME
Directory::Scratch::Structured - creates temporary files and directories from a structured description
SYNOPSIS
my %tree_structure =
(
dir_1 =>
{
subdir_1 =>{},
file_1 =>[],
file_a => [],
},
dir_2 =>
{
subdir_2 =>
{
file_22 =>[],
file_2a =>[],
},
file_2 =>[],
file_a =>['12345'],
file_b =>[],
},
file_0 => [] ,
) ;
use Directory::Scratch::Structured qw(create_structured_tree) ;
my $temporary_directory = create_structured_tree(%tree_structure) ;
or
use Directory::Scratch ;
use Directory::Scratch::Structured qw(piggyback_directory_scratch) ;
my $temporary_directory = Directory::Scratch->new;
$temporary_directory->create_structured_tree(%tree_structure) ;
DESCRIPTION
This module adds a create_structured_tree subroutine to the Directory::Scratch.
DOCUMENTATION
I needed a subroutine to create a bunch of temporary directories and files while running tests. I used the excellent Directory::Scratch to
implement such a functionality. I proposed the subroutine to the Directory::Scratch author but he preferred to implement a subroutine
using an unstructured input data based on the fact that Directory::Scratch didn't use structured data. This is, IMHO, flawed design, though
it may require slightly less typing.
I proposed a hybrid solution to reduce the amount of subroutines and integrate the subroutine using structured input into
Directory::Scratch but we didn't reach an agreement on the API. Instead I decided that I would piggyback on Directory::Scratch.
You can access create_structured_tree through a subroutine or a method through a Directory::Scratch object.
Whichever interface you choose, the argument to the create_structured_tree consists of tuples (hash entries). The key represents the name
of the object to create in the directory.
If the value is of type:
ARRAY
A file will be created, it's contents are the contents of the array (See Directory::Scratch)
HASH
A directory will be created. the element of the hash will also be , recursively, created
OTHER
The subroutine will croak.
SUBROUTINES
/METHODS
create_structured_tree
use Directory::Scratch::Structured qw(create_structured_tree) ;
my $temporary_directory = create_structured_tree(%tree_structure) ;
my $base = $temporary_directory->base() ;
Returns a default Directory::Scratch object.
directory_scratch_create_structured_tree
Adds create_structured_tree to Directory::Scratch when you Load Directory::Scratch::Structured with the piggyback_directory_scratch
option.
use Directory::Scratch ;
use Directory::Scratch::Structured qw(piggyback_directory_scratch) ;
my $temporary_directory = Directory::Scratch->new;
$temporary_directory->create_structured_tree(%tree_structure) ;
_create_structured_tree
Used internally by both interfaces
piggyback
Used internally to piggyback Directory::Scratch.
BUGS AND LIMITATIONS
None so far.
AUTHOR
Khemir Nadim ibn Hamouda
CPAN ID: NKH
mailto:nadim@khemir.net
LICENSE AND COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Directory::Scratch::Structured
You can also look for information at:
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Directory-Scratch-Structured>
o RT: CPAN's request tracker
Please report any bugs or feature requests to L <bug-directory-scratch-structured@rt.cpan.org>.
We will be notified, and then you'll automatically be notified of progress on your bug as we make changes.
o Search CPAN
<http://search.cpan.org/dist/Directory-Scratch-Structured>
SEE ALSO
Directory::Scratch
perl v5.10.1 2010-03-22 Directory::Scratch::Structured(3pm)