01-22-2004
Awk is a great language.
The best book imho is "The Awk Programming Language" by Aho/Weinberger/Kernigan... the creators btw...
It is a little grey book about half an inch thick...
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
This is the format of the file that i have
StartDate:10/01/06
EndDate :10/02/06
Cno Ccode
1 10
2 11
StartDate:10/03/06
EndDate :10/04/06
Cno Ccode
2 13
4 12
StartDate:10/01/06
EndDate :10/02/06 (5 Replies)
Discussion started by: kkm_job
5 Replies
2. Shell Programming and Scripting
Whats the basic difference between double inverted comma and single inverted comma and no comma applied at all?
Eg1 if
Eg2 if
iEg3 f (1 Reply)
Discussion started by: abhisekh_ban
1 Replies
3. Shell Programming and Scripting
Hi All,
Is there any awk or unix command that i can make use such that the output will be as desired ?
The code will extract the latest pattern starting from the term above the asterix till the end of the input
Input:
********
aaa bbb 2007
********
123
234
134
********
xxx yyy 2007... (9 Replies)
Discussion started by: Raynon
9 Replies
4. UNIX for Dummies Questions & Answers
I want to list the occurence of particular characters in a line. my file looks like this
a,b,c,d
e,f,g
h,y:e,g,y s
f;g,s,w
and I want to count how many commas are in each line so the file in the end looks like this:
a,b,c,d 3
e,f,g 2
h,y:e,g,y s 3
f;g,s,w ... (2 Replies)
Discussion started by: Audra
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have the following data in a flat file:
abcd_efgh_ijkl_20080522.dat|20080602222508|1357
abcd_efgh_ijkl_20080522.dat|20080602222508|1357
abcd_efgh_ijkl_20080522.dat|20080602222508|1357
I need to check the no. of occurence of "|" (pipe) on each line and the output should look like below:... (4 Replies)
Discussion started by: hey_mak
4 Replies
6. UNIX for Dummies Questions & Answers
In a file I have to count a particular word. like i need apache how many times.
I tried this
$ tr "\011" "\012\012"<foo1 | tr -cd "" |sort\uniq -c
but I got result like this
32 apache
18 dns
12 doctor
Please sugest me (4 Replies)
Discussion started by: pranabrana
4 Replies
7. Shell Programming and Scripting
I'm not getting the syntax correct to change a line only on the first occurrence:
I've tried to change only the first match and I've tried to change the from the second match forward
sed 's/<B>PT#/<tr><td class=\"pt1\" width=\"40%\"><B>pt#/1' $file > tmpfile.html
sed ... (0 Replies)
Discussion started by: dba_frog
0 Replies
8. Shell Programming and Scripting
Dear all,
I have data like below and i need to add coloumn before the COUNT field to see the Percentage out of all COUNT field value for respective raw.
=============================================
COUNT CODE sConnType tConnType... (6 Replies)
Discussion started by: Iroshan
6 Replies
9. Shell Programming and Scripting
I have a file
# cat asasas
AAAAAA
11
22
33
44
BBBBB
NILNILNIL
AAAAAA
22
33
44
55
66
77
88
BBBBB
NILNILNIL (2 Replies)
Discussion started by: anil510
2 Replies
10. Shell Programming and Scripting
Hi,
I have a file like seen below.
apple, orange, grapes
pineapple
tomato, potato
egg
I need a output like
apple
orange
grapes
pineapple
tomato
potato (8 Replies)
Discussion started by: jayadanabalan
8 Replies
MIXAL(1) Mixal user's manual MIXAL(1)
NAME
mixal - a load-and-go MIX assembler
SYNOPSIS
mixal [ file ... ]
DESCRIPTION
Mixal is an implementation of the hypothetical MIX computer and its assembly language called MIXAL. The computer was designed by Donald
Knuth for use in his monumental and yet to be finished book series The Art of Computer Programming. All programs and all programming exer-
cises in the book are written in the MIXAL language.
This implementation is a load-and-go assembler, meaning that you provide it with a MIXAL program source, which it translates into MIX
machine code, which it promptly executes by acting as a MIX emulator.
You give Mixal zero or more program source files in the command line, which the program interprets. If you give it no arguments, it
expects to find a program in the standard input stream. After the program has executed, the final state of the machine registers are
printed to the standard output stream.
The card punch and line printer devices are connected to the standard input and output stream, respectively. Console input and output are
connected to standard input and output, and the disk devices are connected to files named diskN in the current directory, where N is the
device number. Those files are created on demand.
BUGS
This MIXAL implementation does not do floating-point. The tape devices are not implemented.
AUTHOR
This MIXAL implementation was designed and written by Darius Bacon, and then ported to Unixish systems and debugged by Eric S. Raymond.
This version includes corrections to multiplication and division by Larry Gately. This manual page was written for Debian by Antti-Juhani
Kaijanaho, with changes by Darius Bacon.
SEE ALSO
The files /usr/share/doc/mixal/READ.ME and /usr/share/doc/mixal/NOTES.gz contain some information about this MIXAL implementation. Be sure
to read /usr/share/doc/mixal/README.Debian, too.
A description of the MIX system and the MIXAL language can be found in Donald E. Knuth's book The Art of Computer Programming, Volume 1:
Fundamental Algorithms; 3rd Edition (Addison-Wesley 1997). (Or see the home page at http://www-cs-faculty.stan-
ford.edu/%7Eknuth/taocp.html.)
Debian project 18 May 2003 MIXAL(1)