Sponsored Content
Top Forums Shell Programming and Scripting how to view last line of multiple files Post 302319207 by jojo123 on Sunday 24th of May 2009 03:59:28 PM
Old 05-24-2009
how to view last line of multiple files

Dear All,

can anybody help me out in generating a command that can be used to view the last line of multiples files.

e.g:

file 1 contains 100 records
file 2 contains 200 records
file 3 contails 300 records

now i need a command that can be used to display the last line of each file. (i.e. file 1 file 2 & file 3)

an urgent reply in this regard will be highly appreciated.Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Multiple view of Apsedic to ASCII.

dd conv=ascii if=100.PCN of=foo On paging the 'foo' file i get conversion of the selected file. How can I get multiple 100.PCN's into 1 'foo' file. Usually all my work related files have an extension of .PCN or 001. Upon selecting if=*.* No ouput file is generated. (2 Replies)
Discussion started by: buRst
2 Replies

2. Shell Programming and Scripting

How to Eliminate first line of multiple files

hi gurus ,, I have multiple files with same file pattern..in a particular directory for ex: file20061101.trf file20061102.trf file20061103.trf Each of the file has a header as column names.. My questions is how can i eliminate the first row of each of these... (11 Replies)
Discussion started by: sish78
11 Replies

3. Shell Programming and Scripting

Appending same tring to multiple files in one line?

I have a string that I need to append to 3 files. Say, $ echo "Hello" I want to append this “Hello” to three files, file1, file2 and file3.The files are all in different directories and the file names have no common pattern.Can I do it in one line? If yes, how? :confused: (2 Replies)
Discussion started by: zombiezparadize
2 Replies

4. Shell Programming and Scripting

bash: cat multiple files together except first line?

Hopefully the title summarized what I need help with. I have multiple files that I would like to concatenate in bash. ie: cat file1 file2 file3 > bigfile except I do not want to include the first line from each file (). Any help? Thanks. (6 Replies)
Discussion started by: sanimfj
6 Replies

5. UNIX for Dummies Questions & Answers

Finding nth line across multiple files

I have several files (around 50) that have the similar format. I need to extract the 5th line from every file and output that into a text file. So far, I have been able to figure out how to do it for a single file: $ awk 'NR==5' text1.txt > results.txt OR $ sed -n '5p' text1.txt > results.txt... (6 Replies)
Discussion started by: oriqin
6 Replies

6. Shell Programming and Scripting

How to View multiple Cron jobs

Hi, I ran two crontab commands using: crontab program1 crontab program2 However when I type crontab -l only the second cron job shows up, how do I see all cron jobs running and how do I edit all at the same time Thanks in Advance S:D (10 Replies)
Discussion started by: walforum
10 Replies

7. Shell Programming and Scripting

insert filename into each line of multiple files

I need to insert <filename + comma> into each line of multiple files. Any idea how to script that? Regards, Manu (5 Replies)
Discussion started by: linux.yahoo
5 Replies

8. UNIX for Dummies Questions & Answers

Want to change common line from multiple files

Hi everyone, I've a requirement to modify an existing line which is common to multiple files. I need to replace that existing line with a new line. I've almost 900 ksh files to edit in the similar fashion in the same directory. Example: Existing Line: . $HOME/.eff.env (notice the "." at the... (3 Replies)
Discussion started by: kaleem.adil
3 Replies

9. UNIX for Dummies Questions & Answers

Insert a line into multiple files

HI All, I want to know if it is possible to print the same message but into 2 different files in the same command? Something like . .. ... echo "Text" >> file1 && file2 this is because i creating a script which i use a log but i don't want to duplicate lines of command just to... (5 Replies)
Discussion started by: lordseiya
5 Replies

10. Shell Programming and Scripting

Perl command line option '-n','-p' and multiple files: can it know a file name of a printed line?

I am looking for help in processing of those options: '-n' or '-p' I understand what they do and how to use them. But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.) I did try it and -n works on 2 files. Question is: - is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
BTARCMP(1)						      General Commands Manual							BTARCMP(1)

NAME
btarcmp - a diff for Barry tar backup files SYNOPSIS
btarcmp [-b][-d db][-D db][-h][-I charset][-P][-S][-v] tar0 tar1 DESCRIPTION
btarcmp takes two Barry backup tar files on the command line, and displays the differences it finds between them. If records can be parsed, individual field differences are also displayed. Added and removed records are noted. Differences in database availability are noted as well. If unable to parse the records, hex dumps are used. OPTIONS
-b Use brief filename markers. Useful when tar filenames are extremely long. -d db Name of database to compare. Can be used multiple times to compare multiple databases. If not specified, all databases are com- pared. -D db Name of database to skip. Can be used multiple times. Overrides all other database selection options. -h Show summary of options. -I charset Specifies the iconv charset to use for converting international strings. The Blackberry uses the WINDOWS-1252 charset, which is incompatible with the more common code pages used in Linux. The most useful charset to use with this option is UTF-8, and is highly recommended. Any other charset available via 'iconv --list' can be used here too, but may not be successful for some character con- versions. -S Displays list of known database records, which can be parsed. -v Verbose output, which includes record data of added and deleted records in the output. If used twice, hex data is printed as well. AUTHOR
btarcmp is part of the Barry project. SEE ALSO
http://www.netdirect.ca/barry January 20, 2010 BTARCMP(1)
All times are GMT -4. The time now is 10:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy