12-12-2007
"wc -l file" will tell you how many lines in a file.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file that has 1k lines and i want to print all the lines after 900th line.
an 2)I want to move files f1 ,f2,f3,f4 to p1,p2,p3,p4
Please give me the commands.
Thanx in adv. (6 Replies)
Discussion started by: rajashekar.y
6 Replies
2. Shell Programming and Scripting
hi
we have 3 servers and we have a script to monitor cpu usage of all 3 servers and writes into one file on one of the server where we monitor all those servers ( by doing tail -f filename ) so we decided to create script ( perl ) that will read values from this file and display it should be like... (2 Replies)
Discussion started by: zedex
2 Replies
3. UNIX for Dummies Questions & Answers
Hi. Is there a way in awk to show all lines between a line number and the next line containing a particular regex? We can do these, of course:
awk '/regex1/,/regex2/' filename
awk 'FNR > X && FNR < Y' filename
But can they be combined? Thanks. (3 Replies)
Discussion started by: treesloth
3 Replies
4. Shell Programming and Scripting
I have a code here , which should display lines 6,10,14,18,35 of a text file
#!/bin/ksh
line=6
line=10
line=14
line=18
line=35
for i in 1 2 3 4 5
do
val=`echo ${line}`
act=`awk 'NR~/^($val)$/' db_CHECKOUT.txt`
done;
This code is not working. The purpose of the line below is... (3 Replies)
Discussion started by: njafri
3 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. 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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
awk 'BEGIN{IGNORECASE=1} /error|warning|exception/ { ++x } END { print x }' filename
The above command returning the number of times the pattern present in the file. But I want the the line number as well. please help me out (6 Replies)
Discussion started by: arukuku
6 Replies
9. 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
10. Shell Programming and Scripting
I pass a number to my script. Passing "1" below.
./getfile.sh 1
echo "User entered: $1"
ls -ltr *.conf | sed -n '$p'
I wish to use ls -ltr i.e list files in ascending order of time the latest showing at the bottom of the output.
Number 1 should get me the last row of ls -ltr output i.e... (9 Replies)
Discussion started by: mohtashims
9 Replies
uulog(1) General Commands Manual uulog(1)
NAME
uulog - Displays UUCP log files
SYNOPSIS
/usr/lib/uucp/uulog -f system [-number]
uulog
uulog systems [-number]
uulog -s system [-number]
uulog -x [systems]
The uulog command displays the contents of a log file of uucico or uuxqt activities.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
uulog: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
[Tru64 UNIX] Performs a tail -f on the file transfer log for the specified system, displaying the end of the log file. Use the Interrupt
key sequence to leave the file and return to the prompt. Prints information about copy requests involving the specific system. If no sys-
tem is specified, information is displayed for all systems.
Note: System name can contain only ASCII characters. [Tru64 UNIX] Displays the uuxqt log file for the specified systems. If no
systems are specified, information is displayed for all systems. [Tru64 UNIX] Displays the last lines of the log file. The number
of lines is determined by the number argument. (To display the lines, the uulog command issues a tail for the specified number of
lines.)
DESCRIPTION
Individual log files are created for each remote system with which the local system communicates using the uucp, uusend, uuto, or uux com-
mands.
Use the uulog command to display a summary of uucp, uusend, uuto, and uux command requests by a system or systems. All of these transac-
tions are logged in files under the /usr/spool/uucp/.Log/ directory. The files are named daemon_name/system, where the daemon_name direc-
tory is named for the daemon involved and the system file is named for the remote system the daemon is contacting.
The uucp and uuto commands call the uucico daemon. The uucico activities are logged in the system file in the /usr/spool/uucp/.Log/uucico
directory.
The uux and uusend commands call the uuxqt daemon. The uuxqt activities are logged in the /usr/spool/uucp/.Log/uuxqt/system file.
You can examine these individual log files by issuing the uulog command directly. However, you can also have these temporary log files
appended to a primary log file that you can then examine. This is called compacting the log files and is handled by uudemon.cleanu, a
shell script in /usr/lib/uucp.
NOTES
The uulog utility is marked LEGACY in XCU Issue 5.
EXAMPLES
To display the uucico log file for system hera, enter: uulog -s hera [Tru64 UNIX] To display the uuxqt log file, enter: uulog -x [Tru64
UNIX] To display the last forty lines of the file transfer log for system zeus, enter: uulog -f zeus -40 To display the uucico log file
for systems pluto and venus, enter: uulog pluto venus [Tru64 UNIX] To display the uuxqt log file for systems pluto and venus, enter: uulog
-x pluto venus
FILES
Contains log files. Public directory.
SEE ALSO
Commands: ct(1), cu(1), tail(1), tip(1), uucico(8), uucleanup(8), uucp(1), uuencode(1), uudecode(1), uuname(1), uupick(1), uusched(8),
uusend(1), uustat(1), uuto(1), uux(1)
Standards: standards(5)
uulog(1)