Hello. First time poster here. I have a huge file of IP numbers. I am trying to output only the class b of the IPs and rank them by most common and output the total # of duplicate class b's before the class b. An example is below:
12.107.1.1
12.107.9.54
12.108.3.89
12.109.109.4
12.109.6.3
... (2 Replies)
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (2 Replies)
Hi all,
I'm very very new to UNIX and AWK world.Please help me in finding a solution for my problem.
I'm having a file like this
-----------------------------------------------------------------
~Version Information
VERS. 2.0: CWLS log ASCII Standard -VERSION 2.0
WRAP. ... (4 Replies)
I have a file which contains data as below:
nbk1j7o pageName=/jsp/RMBS/RMBSHome.jsf
nbk1j7o pageName=/jsp/RMBS/RMBSHome.jsf
nbk1j7o pageName=/jsp/RMBS/RMBSHome.jsf
nbk1j7o pageName=/jsp/RMBS/RMBSHome.jsf
nbk1j7o pageName=/jsp/common/index.jsf
nbk1j7o pageName=/jsp/common/index.jsf
nbk1wqe... (6 Replies)
Dear users,
I need to count the number of lines in a simple text file and print the number on the first line of that same file.
I know I can count the lines using
wc -l file.txt
this gives for example
100 file.txt
I need the number 100 to be printed at the very top of file.txt... (2 Replies)
I'm trying to write a script to clean up log file automatically when it reaches 1000 lines. I can't get this to work..can some help me please :)
Server: SunOS 5.8 Generic_117350-53 sun4u sparc SUNW,Netra-T12
#!/bin/ksh
#file reference
file=`echo "$HOME/support/moe/b.tc"`
#linecount... (7 Replies)
Counting number of lines: sp
I am trying to figure out a script to count the number of text files in cywig and have it give me a number (as the answer) any help would be appreciated.
I am new here, so be gentle :D (3 Replies)
I have a "main" file which has blocks of data for each user defined by tags BEGIN and END.
BEGIN
ID_NUM:24879
USER:abc123
HOW:47M
CMD1:xyz1
CMD2:arp2
STATE:active
PROCESS:id60
END
BEGIN
ID_NUM:24880
USER:def123
HOW:4M
CMD1:xyz1
CMD2:xyz2
STATE:running
PROCESS:id64
END (7 Replies)
I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed.
See below for the example data.
................................server 1...............................
running process 1
running... (8 Replies)
I want to count lines of a file using AWK (only) and not in the END part like this awk 'END{print FNR}' because I want to use it.
Does anyone know of a way?
Thanks a lot. (7 Replies)
Discussion started by: guitarist684
7 Replies
LEARN ABOUT MOJAVE
new
NEW(1) [nmh-1.5] NEW(1)NAME
new - report on folders with new messages
fnext - set current folder to next folder with new messages
fprev - set current folder to previous folder with new messages
unseen - scan new messages in all folders with new messages
SYNOPSIS
new [sequences] [-mode mode] [-folders foldersfile] [-version] [-help]
fnext is equivalent to new -mode fnext
fprev is equivalent to new -mode fprev
unseen is equivalent to new -mode unseen
DESCRIPTION
New in its default mode produces a one-line-per-folder listing of all folders containing messages in the listed sequences or in the
sequences listed in the profile entry "Unseen-Sequence". Each line contains the folder, the number of messages in the desired sequences,
and the message lists from the .mh_sequences file. For example:
foo 11.* 40-50
bar 380. 760-772 824-828
total 391.
The `*' on foo indicates that it is the current folder. The last line shows the total number of messages in the desired sequences.
New crawls the folder hierarchy recursively to find all folders, and prints them in lexicographic order. Override this behavior by provid-
ing foldersfile containing the pre-sorted list of folders new should check, one per line.
In fnext and fprev modes, new instead changes to the next or previous matching folder, respectively.
In unseen mode, new executes scan sequences for each matching folder.
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
Path: To determine the user's nmh directory
Current-Folder: To find the default current folder
Unseen-Sequence: The name of the unseen message sequence
SEE ALSO scan(1), mh-format(5)HISTORY
Based on Luke Mewburn's new (http://www.mewburn.net/luke/src/new).
MH.6.8 11 June 2012 NEW(1)