Sponsored Content
Full Discussion: Tail command in one line
Operating Systems Solaris Tail command in one line Post 302247195 by Luka on Wednesday 15th of October 2008 07:08:53 AM
Old 10-15-2008
Because you are overriding the original file (redirection empties it). Destination should be some temporary file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tail command

Hi , I have found a interesting thing about tail command: when I tried to use 'tail -1 *' to look at every file with the current derectory, I only got one line of result of one file. But if I use 'head -1 *', I would get multiple lines. Is there a way to do get multiple lines with 'tail -1 *'... (3 Replies)
Discussion started by: whatisthis
3 Replies

2. Shell Programming and Scripting

tail command..

I was wondering how can I do this I have file myfile.txt wc -l is: 5 000 000 I have to remove first 1 000 000 lines from header.. I tryed with tail -4000000 myfile.txt>newfile.txt but it does not work... any help?? (2 Replies)
Discussion started by: amon
2 Replies

3. Shell Programming and Scripting

Head and Tail in One Line

I am new to UNIX......I have one file which contains thousnads of records with header and tailer. Header Record 1 Record 2 .... .... Last Record Trailer I want to concatenate Header and Trailer in the first line....now the output should look like this: Header: Header value, Trailer:... (2 Replies)
Discussion started by: 33junaid
2 Replies

4. UNIX for Dummies Questions & Answers

how to display line number for tail -f

Hi, Just wonder if there is any quick way to display line number when monitoring a log file with tail -f? (4 Replies)
Discussion started by: iengca
4 Replies

5. Shell Programming and Scripting

Display Specific line number using tail command

Hi , 1)i want to display specific line number using tail command. e.g. display 10 line from end. Please help... 2)Want to display line 10 to 15 (from end)using tail command) (2 Replies)
Discussion started by: vivek1489
2 Replies

6. Shell Programming and Scripting

How to use command tail -f & show line number.

Hello Guys, I have created function which is as follow: tail -f filename |grep "Key word" output from this command 19-11-2011 21:09:15,234 - INFO Numbement - error number:result = :11 19-11-2011 21:09:15,286 - INFO Numbement - error number:result = :11 19-11-2011 21:09:15,523 - INFO... (5 Replies)
Discussion started by: ooilinlove
5 Replies

7. Shell Programming and Scripting

How to process only new line of tail -f command from live log file?

Hi, I want to read a live log file line by line and considering those line which are newly added to file Below code I am using, which read line but as soon as it read new line from log file its starts processing from very first line of file. tail -F /logs/COMMON-ERROR.log | while read... (11 Replies)
Discussion started by: ketanraut
11 Replies

8. Shell Programming and Scripting

How to tail sed and awk in one line?

Hello, I am trying to create an iptables script with tail ,sed and awk. 1st Request: Search keyword "secret" in access.log file 2nd Request: Get first column matching lines (ip address) 3rd Request: Save it to a file This is what I did so far: grep.sh #!/bin/bash while true; do tail... (23 Replies)
Discussion started by: baris35
23 Replies

9. UNIX for Beginners Questions & Answers

Tail -f Command help

Hi Team, Can anyone help me here: I have to access server logs via putty and these logs file is a trailing file (continously updating) with ERROR and WARNINGS... I need to know if I can pull this trailing file to a local drive so that I can do some higlighting on some keywords through Notepad... (13 Replies)
Discussion started by: jitensetia
13 Replies

10. Homework & Coursework Questions

How to display certain line of file only using head or tail in 1 command?

First month learning about the Linux terminal and it has been a challenge yet fun so far. We're learning by using a gameshell. I'm trying to display a certain line ( only allowed 1 command ) from a file only using the head or tail. I'm pretty about this answer: head -23 history.txt | tail -1... (1 Reply)
Discussion started by: forzatekk
1 Replies
Net::CUPS::Destination(3pm)				User Contributed Perl Documentation			       Net::CUPS::Destination(3pm)

NAME
Net::CUPS::Destination - CUPS Destination Object SYNOPSIS
use Net::CUPS::Destination; my $printer = $cups->getDestination( "lj4200dn" ); my $name = $printer->getName(); my @options = $printer->getOptions(); my $jobid = $printer->printFile( $filename, $title ); DESCRIPTION
Net::CUPS is an object oriented interface to the Common Unix Printing System. Net::CUPS::Destination is an abstraction of the concept of a destination in CUPS. Destinations will most likely be a printer, but it can be any type of target in which a file is sent for processing. METHODS
addOption $dest->addOption( $name, $value ); Method to add another option name/value pair to the destination. cancelJob my $dest->cancelJob( $jobid ); Method to chancel a job sent to this destination. getDescription my $description = $dest->getDescription(); Provides the description string associated with this printer. getError my $error = $dest->getError(); Utility method for returning the last error that occured. getName my $name = $dest->getName(); Method to return the name of the destination. getJob my $job = $dest->getJob( $jobid ) Method to get a specific job as a hash of attributes. getJobs my @jobs = $dest->getJobs( $whose, $scope ); This method will return an array of job identifiers. $whose is 0 for all users and 1 is just for the selected user. $scope is -1 for all jobs, 0 for active jobs and 1 for completed jobs. getLocation Returns the location string for this destination. getOptionValue my $value = $dest->getOptionValue( $name ); This utility method will return the value of the selected option. getOptions my @options = $dest->getOptions(); This method will return an array of the options currently set on the destination. printFile my $jobid = $dest->printFile( $filename, $title ); I know this is the method that you have been looking for. This is what you will use to send a file to handled by the destination. You must provide the name of the file and a title for the job. getUri my $uri = $dest->getUri(); This function returns the device URI of a destination. For example, a network printer might appear as socket://192.168.1.1 SEE ALSO
Net::CUPS, Net::CUPS::PPD, Net::CUPS::IPP SUPPORT
Support for this module and other software developed by Dracken Technology, Inc can be found at http://www.dracken.com/. AUTHOR
Dracken Technology, Inc. (http://www.dracken.com/) COPYRIGHT AND LICENSE
Copyright (c) 2003-2005 David Hageman Copyright (c) 2006-2009 Dracken Technology, Inc. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. CUPS, the Common UNIX Printing System, the CUPS logo, and ESP Print Pro are the trademark property of Easy Software Products. perl v5.14.2 2009-07-30 Net::CUPS::Destination(3pm)
All times are GMT -4. The time now is 01:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy