06-20-2011
@Honglus: that is not what is required..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to write a shell script which combines/joins 3 text files into one file. Do i put the txt files in the same folder as my script? Here is what i have:
#!/bin/bash
file1=$1
file2=$2
file3=$3
out="output.txt"
count=0
if
then
echo "$(basename $0) file1 file2 file3"
... (3 Replies)
Discussion started by: zzthejimzz
3 Replies
2. Shell Programming and Scripting
Hi there,
I was wondering if someone can help me with this.
I am trying the combine multiple columns from multiple files into one file.
Example file 1:
c0t0d0 c0t2d0 # hostname vgname
c0t0d1 c0t2d1 # hostname vgname
c0t0d2 c0t2d2 # hostname vgname
c0t1d0 c0t3d0 # hostname vgname1... (5 Replies)
Discussion started by: martva
5 Replies
3. Shell Programming and Scripting
hi people;
this is my file1.txt:192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
...
this is my file2.txt:portnames
usernames
maxusercap
...
i want to write to file3.txt:l ./getports 192.168.1.1 'get all;l+;get . portnames;l-'
l ./getports 192.168.1.1 'get all;l+;get . usernames;l-'... (4 Replies)
Discussion started by: gc_sw
4 Replies
4. UNIX for Dummies Questions & Answers
Hello everybody,
I have a text file containing 10,000 rows and 5000 columns. The values are separated by a tab.
Ex.
file_ex.ped
1 mike 0 0 2 1 A A G G C T A G
1 jack 0 0 2 2 T A G T C A A C
1 Mary 0 0 1 2 A T G C A T G C
...
I would like a out put file
1 mike 0 0 2 1 AA GG CT AG
1... (7 Replies)
Discussion started by: Unilearn
7 Replies
5. UNIX for Dummies Questions & Answers
This may seem obvious but I am having problems doing this as columns get converted to rows when i try to write a script.
I have 2 files text1.txt and text2.txt each of which have 6 columns of numbers separated by a space.
I need to combine the 2 files so that the output file text3.txt maintains... (2 Replies)
Discussion started by: tgoldstone
2 Replies
6. Shell Programming and Scripting
Can anybody help on the script to combine/concatenate columns from multiple files
input1
4 135
5 185
6 85
11 30
16 72
17 30
21 52
22 76
input2
2 50
4 50
6 33
8 62
10 25
12 46
14 42
15 46output (2 Replies)
Discussion started by: sdf
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a bunch of files with the following format.
PUR.1.9
30910 0.024 0.926 0.050
36587 0.024 0.927 0.049
91857 0.023 0.928 0.049
105797 0.024 0.927 0.049
146659 0.024 0.927 0.049
152695 0.024 0.927 0.049
192118 0.022 0.930 0.048
193310 0.018 0.936 0.046
PUR.2.9
30910 0.028... (6 Replies)
Discussion started by: genehunter
6 Replies
8. Shell Programming and Scripting
Hello everyone,
I searched the forum looking for answers to this but I could not pinpoint exactly what I need as I keep having trouble.
I have many files each having two columns and hundreds of rows.
first column is a string (can have many words) and the second column is a number.The files are... (5 Replies)
Discussion started by: isildur1234
5 Replies
9. Shell Programming and Scripting
Hi,
How can I combine the data of of three files into one new file?
I try to give as much informations as possible.
The three existing files are called file1 file2 and file3
the new file should named output_combined.
The size of the files will be around 900 words/lines each .. but always... (5 Replies)
Discussion started by: MyMemberName
5 Replies
10. Shell Programming and Scripting
Input
NJ090237_0263_GRP,NJ090237_0263_VIEW,NJ090237_0263_PSGRP,NJ090237_0263_GOLD_CSGRP,06E:0_08E:0_09E:0_11E:0,0CE5
NJ090237_0264_GRP,NJ090237_0263_VIEW,NJ090237_0264_PSGRP,NJ090237_0263_GOLD_CSGRP,06E:0_08E:0_09E:0_11E:0,0CE5... (7 Replies)
Discussion started by: greycells
7 Replies
LEARN ABOUT SUNOS
wsreg_get_required_components
wsreg_add_required_component(3WSREG) Product Install Registry Library Functions wsreg_add_required_component(3WSREG)
NAME
wsreg_add_required_component, wsreg_remove_required_component, wsreg_get_required_components - add or remove a required component
SYNOPSIS
cc [flag ...] file ...-lwsreg [library ...]
#include <wsreg.h>
int wsreg_add_required_component(Wsreg_component *comp, const Wsreg_component *requiredComp);
int wsreg_remove_required_component(Wsreg_component *comp, const Wsreg_component *requiredComp);
Wsreg_component **wsreg_get_required_components(const Wsreg_component *comp);
DESCRIPTION
The wsreg_add_required_component() function adds the component specified by requiredComp to the list of required components contained in
the component specified by comp.
The wsreg_remove_required_component() function removes the component specified by requiredComp from the list of required components con-
tained in the component specified by comp.
The wsreg_get_required_components() function returns the list of required components contained in the component specified by comp.
RETURN VALUES
The wsreg_add_required_component() function returns a non-zero value if the specified required component was successfully added. Otherwise,
0 is returned.
The wsreg_remove_required_component() function returns a non-zero value if the specified required component was successfully removed. Oth-
erwise, 0 is returned.
The wsreg_get_required_components() function returns a null-terminated array of Wsreg_component pointers that represents the specified com-
ponent's list of required components. If the specified component has no required components, NULL is returned. The resulting array must
be released by the caller through a call to wsreg_free_component_array(). See wsreg_create_component(3WSREG).
USAGE
The relationship between two components in which one must be installed for the other to be complete is a dependent/required relationship.
The component that is required by the other component is the required component. The component that requires the other is the dependent
component.
The required component must be installed and registered before the dependent component can be. Uninstaller applications should check the
registry before uninstalling and unregistering components so a successful uninstallation of one product will not result in another product
being compromised.
Read access to the product install registry is required in order to use these functions because these relationships are held with light-
weight component references that can only be fully resolved using the registry contents.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
wsreg_add_dependent_component(3WSREG), wsreg_can_access_registry(3WSREG), wsreg_create_component(3WSREG), wsreg_initialize(3WSREG),
wsreg_register(3WSREG), attributes(5)
SunOS 5.10 22 Sep 2000 wsreg_add_required_component(3WSREG)