Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Good resource for learning awk with example Post 302539406 by javabuddy on Sunday 17th of July 2011 07:59:18 AM
Old 07-17-2011
Thanks jostber, awk lines are really good.
 

8 More Discussions You Might Find Interesting

1. Programming

Pointer to good select resource

Hi I am starting a new project that is going to be doing a lot of p2p networking in a solaris environment, can anyone point me to a really good resource for using either select() or (solaris only) /dev/poll in a C++ environment with sockets? I have found a couple that vaguely cover C++ select()... (0 Replies)
Discussion started by: liliafan
0 Replies

2. Shell Programming and Scripting

Learning Sed and Awk

Hello, Im new to Sed and Awk, and would like to read through a nice tutorial. Could you please suggest me one. Thanks (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

3. Shell Programming and Scripting

Good learning perl Book

Can anyone suggest a good pearl book?:) (2 Replies)
Discussion started by: nygenka
2 Replies

4. UNIX for Dummies Questions & Answers

Text book / online resource for learning to program at system/kernel level

Is there any book/resource that one can refer to, to be able to write programs at kernel/system level.. I'm looking for a programming book that could serve as a guide to write kernel codes / system level programming etc.. I have Tannenbaum's Design and Implementation. It addresses theoretical... (2 Replies)
Discussion started by: vishwamitra
2 Replies

5. UNIX for Dummies Questions & Answers

Book for Learning unix shell scripting reall good

Hi guys I want o learn and understand shell scripting real good, Ive got already some background Due to the fact that there is ton of books with these theme, can you recommend me some good book with with examples explanations, pls no theoretical books :D Thxs (3 Replies)
Discussion started by: kl1ngac1k
3 Replies

6. Shell Programming and Scripting

it's ok to learn awk and not learning sed?

please reflect... since I am beginner and dont know what to do ---------- Post updated at 04:25 AM ---------- Previous update was at 04:19 AM ---------- I am aware that awk is programming language and sed is just a tool (however people created some games with it). thanks (2 Replies)
Discussion started by: c_lady
2 Replies

7. Shell Programming and Scripting

Should I focus efforts on learning Perl or develop skills in awk, sed, etc

Good afternoon, I am not trying to start a debate. Please don't take it that way. I'm not trying to make this a Perl versus Bash scripts thing. I have been writing shell scripts for several years. I am not 100%, but I seem to get the job done. I would like to start focusing on spending... (11 Replies)
Discussion started by: brianjb
11 Replies

8. UNIX for Beginners Questions & Answers

UNIX for learning sed/awk/grep..etc..

Greetings all, I am looking for a version of Linux that I can practice my scripting skills on. Currently, I support a massive system running on AIX. I want to do more with awk, sed, grep, and even perl. I am looking for something I can throw on a VM on my personal laptop and mess around with.... (5 Replies)
Discussion started by: jeffs42885
5 Replies
PRUNEHISTORY(8) 					      System Manager's Manual						   PRUNEHISTORY(8)

NAME
prunehistory - remove file names from Usenet history file SYNOPSIS
prunehistory [ -f filename ] [ -p ] [ input ] DESCRIPTION
Prunehistory modifies the history(5) text file to ``remove'' a set of filenames from it. The filenames are removed by overwriting them with spaces, so that the size and position of any following entries does not change. Prunehistory reads the named input file, or standard input if no file is given. The input is taken as a set of lines. Blank lines and lines starting with a number sign (``#'') are ignored. All other lines are should consist of a Message-ID followed by zero or more file- names. The Messge-ID is used as the dbz(3) key to get an offset into the text file. If no filenames are mentioned on the input line, then all filenames in the text are ``removed.'' If any filenames are mentioned, they are converted into the history file notation. If they appear in the line for the specified Message-ID then they are removed. Since innd(8) only appends to the text file, prunehistory does not need to have any interaction with it. OPTIONS
-p Prunehistory will normally complain about lines that do not follow the correct format. If the ``-p'' flag is used, then the program will silently print any invalid lines on its standard output. (Blank lines and comment lines are also passed through.) This can be useful when prunehistory is used as a filter for other programs such as reap. -f The default name of the history file is /var/lib/news/history; to specify a different name, use the ``-f'' flag. EXAMPLES
It is a good idea to delete purged entries and rebuild the dbz database every so often by using a script like the following: ctlinnd throttle "Rebuilding history database" cd /var/lib/news awk 'NF > 2 { printf "%s %s %s", $1, $2, $3; for (i = 4; i <= NF; i++) printf " %s", $i; print " "; }' <history >history.n if makehistory -r -f history.n ; then mv history.n history mv history.n.pag history.pag mv history.n.dir history.dir else echo 'Problem rebuilding history; old file not replaced' fi ctlinnd go "Rebuilding history database" Note that this keeps no record of expired articles. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.9, dated 1996/10/29. SEE ALSO
dbz(3), history(5), innd(8). PRUNEHISTORY(8)
All times are GMT -4. The time now is 08:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy