Sponsored Content
Top Forums Shell Programming and Scripting combine data of 2 files by variable Post 302288944 by dicenl on Wednesday 18th of February 2009 10:41:16 AM
Old 02-18-2009
Ok tnx. that's some code i wouldnt have come up with Smilie still lots to learn! i will try it tonight at home. i'll let you know if it works!

(i use SuSE Linux)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recover data from 2 files then combine

Using dd or similar tools to recover data from 2 damaged cdroms, I need a way to then combine the 2 files, 1 from each cd, and make a good file: this all result from finding that certain cd's tops scratch easily even when using the "proper" cd markers, hence making the file useless, however the... (1 Reply)
Discussion started by: saint65
1 Replies

2. Shell Programming and Scripting

How to combine data files using for loop

Hi, I have 5 files basically;namely file1.txt situated each at folder A to E respectively. I would like to extract out third column from each of these file1.txt from folder A to folder E. Also, I wanted to extract the first and second column which are common. In other words, e.g ... (6 Replies)
Discussion started by: ahjiefreak
6 Replies

3. Shell Programming and Scripting

get data from files combine them to a file

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. Shell Programming and Scripting

How to combine data from 2 file ? How to print ?

Dear friends, I am just trying to print data from 2 file,namely file_1.txt and file_1.dat (specific column of ROW 1) file_1.txt 12 13 14 15 99 AMC 69 36 89 12 13 14 15 99 AMC 69 84 -12 12 13 14 ... (6 Replies)
Discussion started by: nex_asp
6 Replies

5. Shell Programming and Scripting

How to combine the data of files?

I have a main file as follows aaa 3/2 = 1.5 aba 55+6 = 61 aca 67+8 = 75 hjk 3+3 = 67 ghd 66+30 = 96 ghj 99-3 = 96 ffg 67+3 = 70 I have 4 sub files named sub1, sub2, sub3, sub4 content of sub1 aaa 23+5 = 28 hjk 45+6 = 51 ghd 40-20 = 20 ... (2 Replies)
Discussion started by: jackevan
2 Replies

6. Shell Programming and Scripting

Combine/omit data from 2 files

i made a script on my own. this is for the inventory to all of my AWS servers, and i run it to all of my servers to get the hostname, please look at file2. Then i need some data in file3 as well,. i need to combine them #cat file1 192.10.1.41 server.age.com ###### 192.10.0.40 ssh cant... (10 Replies)
Discussion started by: kenshinhimura
10 Replies

7. Shell Programming and Scripting

Combine data from two files base on uniq data

File 1 ID Name Po1 Po2 DD134 DD134_4A_1 NN-1 L_0_1 DD134 DD134_4B_1 NN-2 L_1_1 DD134 DD134_4C_1 NN-3 L_2_1 DD142 DD142_4A_1 NN-1 L_0_1 DD142 DD142_4B_1 NN-2 L_1_1 DD142 DD142_4C_1 NN-3 L_2_1 DD142 DD142_3A_1 NN-41 L_3_1 DD142 DD142_3A_1 NN-42 L_3_2 File 2 ( Combination of... (1 Reply)
Discussion started by: pareshkp
1 Replies

8. Shell Programming and Scripting

Combine data out of 3 files into one new file

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

9. UNIX for Dummies Questions & Answers

Stack data from multiple files into one, with variable column files

Hello Gurus, Im new to scripting. Got struck with a file merge issue in Unix. Was looking for some direction and stumbled upon this site. I saw many great posts and replies but couldnt find a solution to my issue. Greatly appreciate any help.. I have three csv files -> Apex_10_Latest.csv,... (1 Reply)
Discussion started by: wamshi
1 Replies

10. UNIX for Beginners Questions & Answers

Automate splitting of files , scp files as each split completes and combine files on target server

i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
AMADMIN(8)						  System Administration Commands						AMADMIN(8)

NAME
amadmin - administrative interface to control Amanda backups SYNOPSIS
amadmin [-o configoption...] config command [command_options...] DESCRIPTION
Amadmin performs various administrative tasks on the config Amanda configuration. See the amanda(8) man page for more details about Amanda. COMMANDS
Commands that take a hostname [ disks ] parameter pair operate on all disks in the disklist(5) for that hostname if no disks are specified. Where hostname is also marked as being optional, the command operates on all hosts and disks in the disklist(5) when no hostname is given. Both hostname and disks are match expressions; see amanda-match(7) for a description. version Show the current version and some compile time and runtime parameters. The config parameter must be present but is ignored. estimate [ hostname [ disks ]* ]* Print the server estimate for the dles, each output lines have the following format: hostname diskname level size hostname The quoted hostname diskname The quoted diskname level The level of the estimate size The estimate size in kbytes force-bump [ hostname [ disks ]* ]+ Force the disks on hostname to bump to a new incremental level during the next Amanda run. force-no-bump [ hostname [ disks ]* ]+ Force the disks on hostname to not bump to a new incremental level during the next Amanda run. unforce-bump [ hostname [ disks ]* ]+ Undo a previous force-bump or force-no-bump command. force [ hostname [ disks ]* ]+ Force the disks on hostname to do a full (level 0) backup during the next Amanda run. unforce [ hostname [ disks ]* ]+ Undo a previous force command. reuse tapelabel [ ... ] The tapes listed will be available for reuse at their point in the tape cycle. no-reuse tapelabel [ ... ] The tapes listed will not be reused when their turn comes up again in the tape cycle. Note that if this causes the number of reusable tapes to drop below the amanda.conf tapecycle value, Amanda will request new tapes until the count is satisfied again. Tape marked no-reuse are available for recovery, marking them no-reuse is a security to be sure amanda will not overwrite them. due [ hostname [ disks ]* ]* Show when the next full dump is due. find [ --sort hkdlpbfw ] [ hostname [ disks ]* ]* Display all backups currently on tape or in the holding disk. The tape label or holding disk filename, file number, and status are displayed. The --sort option changes the sort order using the following flags: h: host name k: disk name d: dump timestamp l: backup level p: dump part b: tape label f: filenum on tape w: write timestamp An uppercase letter reverses the sort order for that key. The default sort order is hkdlpbfw. holding delete hostname [ disk [ datestamp [ .. ] ] ] Delete holding files matching the given specification. At least a hostname must be provided. holding list [-l] [-d] [ hostname [ disk [ datestamp [ .. ] ] ] ] List holding files matching the given dump specification, or all holding files if no specification is provided. See amanda-match(7) for more information on dump specifications. With '-l', additional information (size, level, and whether the dump is outdated) is provided. With '-d', only outdated dumps are shown. An outdated holding file is one which is not required for a restore of the most recent dump. Note that outdated dumps may still be required for restores at earlier dates. For example, assume that a DLE had a level 0 on Monday, level 1's Tuesday through Thursday, and a level 2 on Friday. Then the files required for a restore of Fridays (the most recent) dump are those from Monday (level 0), Thursday (level 1), and Friday (level 2). Tuesday and Wednesday's files are outdated. delete [ hostname [ disks ]* ]+ Delete the specified disks on hostname from the Amanda database. Note If you do not also remove the disk from the disklist(5) file, Amanda will treat it as a new disk during the next run. tape Display the tape(s) Amanda expects to write to during the next run. See also amcheck(8). bumpsize Display the current bump threshold parameters, calculated for all backup levels. balance [ --days <num> ] Display the distribution of full backups throughout the dump schedule. export [ hostname [ disks ]* ]* Convert records from the Amanda database to a text format that may be transmitted to another Amanda machine and imported. import Convert exported records read from standard input to a form Amanda uses and insert them into the database on this machine. disklist [ hostname [ disks ]* ]* Display the disklist(5) information for each of the disks on hostname (or all hosts). Mostly used for debugging. hosts Output a list of distinct hosts in the disklist(5), one per line, for easy use in shell scripts. dles Output a list of distinct DLEs in the disklist(5), one per line with host and diskname separated by a space, for easy use in shell scripts. info [ hostname [ disks ]* ]* Display the database record for each of the disks on hostname (or all hosts). Mostly used for debugging. -o configoption See the "CONFIGURATION OVERRIDE" section in amanda(8). EXAMPLES
Request three specific file systems on machine-a get a full level 0 backup during the next Amanda run. $ amadmin daily force machine-a / /var /usr amadmin: machine-a:/ is set to a forced level 0 tonight. amadmin: machine-a:/var is set to a forced level 0 tonight. amadmin: machine-a:/usr is set to a forced level 0 tonight. Request all file systems on machine-b get a full level 0 backup during the next Amanda run. $ amadmin daily force machine-b amadmin: machine-b:/ is set to a forced level 0 tonight. amadmin: machine-b:/var is set to a forced level 0 tonight. amadmin: machine-b:/usr is set to a forced level 0 tonight. amadmin: machine-b:/home is set to a forced level 0 tonight. Undo the previous force request for /home on machine-b. The other file systems will still get a full level 0 backup. $ amadmin daily unforce machine-b /home amadmin: force command for machine-b:/home cleared. Locate backup images of /var from machine-c. The tape or file column displays either a tape label or a filename depending on whether the image is on tape or is still in the holding disk. If the image is on tape, the file column tells you which file on the tape has the image (file number zero is a tape label). This column shows zero and is not meaningful if the image is still in the holding disk. The status column tells you whether the backup was successful or had some type of error. $ amadmin daily find machine-c /var date host disk lv tape or file file part status 2000-11-09 machine-c /var 0 000110 9 -- OK 2000-11-08 machine-c /var 2 000109 2 -- OK 2000-11-07 machine-c /var 2 /amanda/20001107/machine-c._var.2 0 OK 2000-11-06 machine-c /var 2 000107 2 -- OK 2000-11-05 machine-c /var 2 000106 3 -- OK 2000-11-04 machine-c /var 2 000105 2 -- OK 2000-11-03 machine-c /var 2 000104 2 -- OK 2000-11-02 machine-c /var 2 000103 2 -- OK 2000-11-01 machine-c /var 1 000102 5 -- OK 2000-10-31 machine-c /var 1 000101 3 -- OK Forget about the /workspace disk on machine-d. If you do not also remove the disk from the disklist(5) file, Amanda will treat it as a new disk during the next run. $ amadmin daily delete machine-d /workspace amadmin: machine-d:/workspace deleted from database. amadmin: NOTE: you'll have to remove these from the disklist(5) yourself. Find the next tape Amanda will use (in this case, 123456). $ amadmin daily tape The next Amanda run should go onto tape 123456 or a new tape. Show how well full backups are balanced across the dump cycle. The due-date column is the day the backups are due for a full backup. #fs shows the number of filesystems doing full backups that night, and orig KB and out KB show the estimated total size of the backups before and after any compression, respectively. The balance column shows how far off that night's backups are from the average size (shown at the bottom of the balance column). Amanda tries to keep the backups within +/- 5%, but since the amount of data on each filesystem is always changing, and Amanda will never delay backups just to rebalance the schedule, it is common for the schedule to fluctuate by larger percentages. In particular, in the case of a tape or backup failure, a bump will occur the following night, which will not be smoothed out until the next pass through the schedule. The last line also shows an estimate of how many Amanda runs will be made between full backups for a file system. In the example, a file system will probably have a full backup done every eight times Amanda is run (e.g. every eight days). $ amadmin daily balance due-date #fs orig KB out KB balance ------------------------------------------- 11/10 Mon 21 930389 768753 +5.1% 11/11 Tue 29 1236272 733211 +0.2% 11/12 Wed 31 1552381 735796 +0.6% 11/13 Thu 23 1368447 684552 -6.4% 11/14 Fri 32 1065603 758155 +3.6% 11/15 Sat 14 1300535 738430 +0.9% 11/16 Sun 31 1362696 740365 +1.2% 11/17 Mon 30 1427936 773397 +5.7% 11/18 Tue 11 1059191 721786 -1.3% 11/19 Wed 19 1108737 661867 -9.5% ------------------------------------------- TOTAL 241 12412187 7316312 731631 (estimated 8 runs per dumpcycle) SEE ALSO
amanda(8), amanda(8), amcheck(8), amdump(8), amrestore(8), amfetchdump(8), amanda-match(7) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHORS
James da Silva <jds@amanda.org> Stefan G. Weichinger <sgw@amanda.org> Amanda 3.3.1 02/21/2012 AMADMIN(8)
All times are GMT -4. The time now is 12:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy