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)
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)
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)
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)
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)
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)
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)
BOS_PRUNE(8) AFS Command Reference BOS_PRUNE(8)NAME
bos_prune - Removes obsolete files from /usr/lib/openafs and /var/log/openafs
SYNOPSIS
bos prune -server <machine name> [-bak] [-old] [-core]
[-all] [-cell <cell name>] [-noauth] [-localauth]
[-help]
bos p -s <machine name> [-b] [-o] [-co] [-a]
[-ce <cell name>] [-n] [-l] [-h]
DESCRIPTION
The bos prune command removes files from the local disk of the server machine named by the -server argument, as specified by one or more of
the following flags provided on the command line:
o The -bak flag removes all files from the /usr/lib/openafs directory that have a ".BAK" extension.
o The -old flag removes all files from the /usr/lib/openafs directory that have a ".OLD" extension.
o The -core flag removes all files from the /var/log/openafs directory that have a "core." prefix.
o The -all flag removes all three types of files at once.
(If none of these flags are included, the command appears to succeed, but removes no files at all.)
To display the timestamp on the current, ".BAK", and ".OLD" versions of one or more files, use the bos getdate command.
OPTIONS -server <machine name>
Indicates the server machine from which to remove files. Identify the machine by IP address or its host name (either fully-qualified or
abbreviated unambiguously). For details, see bos(8).
-bak
Removes all files from the /usr/lib/openafs directory that have a ".BAK" extension. Do not combine this flag and the -all flag.
-old
Removes all files from the /usr/lib/openafs directory that have a ".OLD" extension. Do not combine this flag and the -all flag.
-core
Removes all files from the /var/log/openafs directory that have a "core." prefix. Do not combine this flag and the -all flag.
-all
Combines the effect of the -bak, -old, and -core flags. Do not combine this flag with any of those three.
-cell <cell name>
Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see bos(8).
-noauth
Assigns the unprivileged identity "anonymous" to the issuer. Do not combine this flag with the -localauth flag. For more details, see
bos(8).
-localauth
Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The bos command interpreter presents the ticket
to the BOS Server during mutual authentication. Do not combine this flag with the -cell or -noauth options. For more details, see
bos(8).
-help
Prints the online help for this command. All other valid options are ignored.
EXAMPLES
The following example removes all files from the /usr/lib/openafs directory on the machine "fs3.abc.com" that have a ".BAK" or ".OLD"
extension.
% bos prune -server fs3.abc.com -bak -old
The following example removes all files from the /usr/lib/openafs directory on the machine "db2.abc.com" that have a ".BAK" or ".OLD"
extension, and all files from the /var/log/openafs directory that have a "core." prefix.
% bos prune -server db2.abc.com -all
PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on the machine named by the -server argument, or must be logged onto a
server machine as the local superuser "root" if the -localauth flag is included.
The bos prune command cannot be run against servers which are in restricted mode.
SEE ALSO KeyFile(5), UserList(5), bos(8), bos_getdate(8)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 BOS_PRUNE(8)