Sponsored Content
Full Discussion: Give name for every nth line
Top Forums UNIX for Dummies Questions & Answers Give name for every nth line Post 302724611 by Amanda Low on Thursday 1st of November 2012 02:13:57 AM
Old 11-01-2012
Dear pamu and elixir sinari,

Thank you very much! It works!! Really helps a lot.

Best wishes,
Amanda
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get Nth record from last line

I have a growing file . I knew only last few lines which is constant for evey job run. I'd need to pull the Nth record from the last line. In this case i should not use search pattern. (2 Replies)
Discussion started by: ford2020
2 Replies

2. Shell Programming and Scripting

Read last word of nth line

Hi people; i want to read the last word of the 14th line of my file1.txt. Here is the EXACT 14th line of the file. 250 SectorPortnum=3,AuxPortInUngo=2,PortDeviceGroup=1,PortDeviceSet=1,PorDevice=1 20 >>> Set. i have to get the word Set. how can i call it and also how... (3 Replies)
Discussion started by: gc_sw
3 Replies

3. Shell Programming and Scripting

get 3rd column of nth line

hi; i have a file.txt and its 9th, 10th and 11th line lines are: RbsLocalCell=S2C1 maxPortIP 4 (this is 9th line) RbsLocalCell=S3C1 maxPortIP 4 (this is 10th line) RbsLocalCell=S1C1 ... (11 Replies)
Discussion started by: gc_sw
11 Replies

4. Shell Programming and Scripting

How to start reading from the nth line till the last line of a file.

Hi, For my reuirement, I have to read a file from the 2nd line till the last line<EOF>. Say, I have a file as test.txt, which as a header record in the first line followed by records in rest of the lines. for i in `cat test.txt` { echo $i } While doing the above loop, I have read... (5 Replies)
Discussion started by: machomaddy
5 Replies

5. UNIX for Dummies Questions & Answers

how to delete nth line

can you please tell me (1) how to delete 1st and 3rd line only from a file. (2) How to delete last 4 lines in a file that has 2 blank lines out of last 4 lines. Thank you. (2 Replies)
Discussion started by: Ariean
2 Replies

6. Shell Programming and Scripting

Calculating average for every Nth line in the Nth column

Is there an awk script that can easily perform the following operation? I have a data file that is in the format of 1944-12,5.6 1945-01,9.8 1945-02,6.7 1945-03,9.3 1945-04,5.9 1945-05,0.7 1945-06,0.0 1945-07,0.0 1945-08,0.0 1945-09,0.0 1945-10,0.2 1945-11,10.5 1945-12,22.3... (3 Replies)
Discussion started by: ncwxpanther
3 Replies

7. Shell Programming and Scripting

Print every nth line

Dear all, How to print every nth line. File like this: File input: 1 1 1 1 1 1 2 2 2 3 3 3 3 3 3 (3 Replies)
Discussion started by: attila
3 Replies

8. Shell Programming and Scripting

Print nth line in a file

Bash/Oracle Linux 6.4 A basic requirement. How can I get nth line of a file printed ? Can I use grep in this case ? Example: In the below file, 12th line is "Kernel parameter check passed for rmem_max" . I just want the 12 line to be printed. # cat sometext.txt Kernel version check... (2 Replies)
Discussion started by: John K
2 Replies

9. UNIX for Beginners Questions & Answers

Insert a line of text on nth line of a file

Hi All, I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise My intention is to insert a line of text after 13th line of every file inside a particular directory. While trying to do it for a single file , i am using sed sed '3 i this is the 4th line' filename sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
AMCLEANUP(8)						  System Administration Commands					      AMCLEANUP(8)

NAME
amcleanup - run the Amanda cleanup process after a failure SYNOPSIS
amcleanup [-k] [-p] [-r] [-v] config DESCRIPTION
Amcleanup generates the Amanda Mail Report and updates the Amanda databases after a system failure on a tape server host. This cleanup process is normally done automatically as part of the amdump program, but if amdump cannot complete for some reason (usually because of a tape server host crash), amcleanup must be run some time later (usually during system boot). The amcleanupdisk program is run with the same [-r] and [-v] options. See the amanda(8) man page for more details about Amanda. OPTIONS
-k Kill all process listed in the log file are their child. if there is no log file, then kill all amdump and amflush process and their child. -p Do the cleanup only if all process listed in the log file are already terminated. -r Remove bad file in holding disk. This options is passed to amcleanupdisk. -v Generate verbose output. This options is passed to amcleanupdisk. EXAMPLES
This example runs the Amanda cleanup process by hand after a failure. % amcleanup daily Putting the following line in a system boot script (e.g. /etc/rc.local) runs the Amanda cleanup process as part of the reboot, eliminating the need to run it by hand. /usr/local/sbin/amcleanup daily If nothing needs to be done, amcleanup exits normally with the message: amcleanup: no unprocessed logfile to clean up. SEE ALSO
amanda(8), amdump(8) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHORS
James da Silva <jds@amanda.org> Stefan G. Weichinger <sgw@amanda.org> Amanda 3.3.3 01/10/2013 AMCLEANUP(8)
All times are GMT -4. The time now is 08:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy