10 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
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
2. Shell Programming and Scripting
Hi,
Can someone help with this PERL code; I am getting this error while running below code:
And this is the code:
use File::Tail;
$file=File::Tail->new("/some/log/file");
while (defined($line=$file->read)) {
print "$line";
}
I don't usually use PERL therefore I am not... (1 Reply)
Discussion started by: INHF
1 Replies
3. UNIX for Dummies Questions & Answers
hay i need to display middle line:
1
2
3
4
5
how can i display 3-4? (6 Replies)
Discussion started by: margan_ron
6 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
Hi everyone, I'm trying to write a script to format a file using unix2dos. I want to output all but the first 14 lines in a file. Then I want to pipe this to unix2dos to convert the output to a file that's easily readable on windows. Here's what I have:
export Lines=`wc -l < $1`
export... (11 Replies)
Discussion started by: LuminalZero
11 Replies
6. UNIX for Dummies Questions & Answers
Assume that the text file contains over 40 lines. How do you do this?!?!? (5 Replies)
Discussion started by: phunkypants
5 Replies
7. Shell Programming and Scripting
Can any one please help why does tail -f does not work in the below code:
Thanks in advance.
#!/usr/bin/perl -w
my $path = "/home/cs/logs/";
my $log = "log.txt";
`cd $path`;
`tail -f $log`; (3 Replies)
Discussion started by: sureshcisco
3 Replies
8. Shell Programming and Scripting
Hi All,
How I will read the output of the tail -F command in perl.
I have text file with below contains
file1.txt
1
2
3
4
$running=1;
sub openLog($)
{
(my $log) = @_; (1 Reply)
Discussion started by: pravin27
1 Replies
9. UNIX for Dummies Questions & Answers
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
10. Shell Programming and Scripting
The system I work on, produces several kinds of status-files in a single directory. I would like to be able to see the files as they are added to this directory.
I was wondering if it would be possible to get a "tail -f" alike view of the ls-command, in such a way that a newly added file is... (4 Replies)
Discussion started by: rschelkers
4 Replies