Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ansi2knr(1) [redhat man page]

ANSI2KNR(1)						      General Commands Manual						       ANSI2KNR(1)

NAME
ansi2knr - convert ANSI C to Kernighan & Ritchie C SYNOPSIS
ansi2knr [--filename filename] [input_file [output_file]] DESCRIPTION
--filename provides the file name for the #line directive in the output, overriding input_file (if present). If no input_file is supplied, input is read from stdin. If no output_file is supplied, output goes to stdout. There are no error messages. ansi2knr recognizes function definitions by seeing a non-keyword identifier at the left margin, followed by a left parenthesis, with a right parenthesis as the last character on the line, and with a left brace as the first token on the following line (ignoring possible intervening comments). It will recognize a multi-line header provided that no intervening line ends with a left or right brace or a semi- colon. These algorithms ignore whitespace and comments, except that the function name must be the first thing on the line. ansi2knr also recognizes adjacent string literals and concatenates them. The following constructs will confuse it: - Any other construct that starts at the left margin and follows the above syntax (such as a macro or function call). - Some macros that tinker with the syntax of the function header. - String literals whose concatenation requires rewriting their contents; e.g. "ab " "07c" is concatenated to "ab 07c", which is not correct. The --varargs switch is obsolete, and is recognized only for backwards compatibility. The present version of ansi2knr will always attempt to convert a ... argument to va_alist and va_dcl. AUTHOR
L. Peter Deutsch <ghost@aladdin.com> wrote the original ansi2knr and continues to maintain the current version; most of the code in the current version is his work. ansi2knr also includes contributions by Francois Pinard <pinard@iro.umontreal.ca>, Jim Avera <jima@net- com.com>, and Paul Eggert <eggert@twinsun.com>. 8 March 2000 ANSI2KNR(1)

Check Out this Related Man Page

base64(1)						    BSD General Commands Manual 						 base64(1)

NAME
base64 -- Encode and decode using Base64 representation SYNOPSIS
base64 [-d | -h | -v | -D] [-b count] [-i input_file] [-o output_file] DESCRIPTION
base64 encodes and decodes Base64 data, as specified in RFC 4648. With no options, base64 reads raw data from stdin and writes encoded data as a continuous block to stdout. OPTIONS
The following options are available: -b count --break=count Insert line breaks every count characters. Default is 0, which generates an unbroken stream. -d --debug Print verbose log messages during processing. -D --decode Decode incoming Base64 stream into binary data. -h --help Print usage summary and exit. -i input_file --input=input_file Read input from input_file. Default is stdin; passing - also represents stdin. -o output_file --output=output_file Write output to output_file. Default is stdout; passing - also represents stdout. -v --version Print build version and exit. SEE ALSO
openssl(1), wikipedia page <http://en.wikipedia.org/wiki/Base64>, RFC 4648 <http://tools.ietf.org/html/rfc4648> Mac OS X 10.7 February 8, 2011 Mac OS X 10.7
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Question about the here tag

Hello, Can you tell me why the last command(echo) in this script does not execute? In the command line I have to hit control -d to terminate this tag but I dont know how to do it in a shell script. sqlplus -s <<EOF connect / as sysdba select sysdate from dual; quit; EOF echo... (13 Replies)
Discussion started by: majormark
13 Replies

2. Shell Programming and Scripting

unexpected syntax error

Hi, i am getting following syntax error ...kingly advice why is it coming ?? #!/bin/bash find . -name "common.log" if ; then echo "1" fi Himnashu@home /bin $ ./a.sh ./a.sh: line 7: syntax error near unexpected token `fi' ./a.sh: line 7: `fi' (9 Replies)
Discussion started by: himvat
9 Replies

3. Programming

what would happen if a process wrote to its own stdin?

what would happen if a process wrote to its own stdin? #include<unistd.h> #include<fcntl.h> int main() { if((write(STDIN_FILENO,"arrgh!",6))==-1) { perror("error writing to file"); } } output: $ gcc temp.c $ ./a.out arrgh!$ (9 Replies)
Discussion started by: c_d
9 Replies

4. Shell Programming and Scripting

sh syntax error unexpected token done

I'm getting the following error: line 21: syntax error near unexpected token `done` line 21: `done` and I haven't been able to figure out why. Here is my code #!/bin/sh if ; then echo 'Usage: rename getexp/replStr ' exit 0 fi arg = $1 shift while ; do (5 Replies)
Discussion started by: NullPointer
5 Replies

5. Shell Programming and Scripting

select contents between two delimiters (not working if newline in encountered)

Hi, I am facing difficulties in selecting the contents between two delimiters when there is a new line occurs.. Eg: >more sample.txt abcd -- this is the first line % efgh-- this is the second line and not able to print % ijkl -- this is the 3rd line % when i search for abcd and... (8 Replies)
Discussion started by: Balaji PK
8 Replies

6. Shell Programming and Scripting

Please help me to figure out the logic for this problem

Hello, i am on 2.6.13-1.1526_FC4smp i have directory named /home , and in there i have directory 2009_10_10 and two files : 2009_10_10.log and 2009_10_11.log How to write shell script which will delete only file/s that don't have his/their 'parent' directory, so in this case , only... (7 Replies)
Discussion started by: tonijel
7 Replies

7. UNIX for Dummies Questions & Answers

Syntax error near unexpected token

hi! just want to seek help on this error: syntax error near unexpected token 'do this is my script # !/bin/sh # for y in 27 25 do exemmlmx -c "ZEEI;" -n XRT$y >> blah done what can be wrong? thanks! (6 Replies)
Discussion started by: engr.jay
6 Replies

8. Shell Programming and Scripting

Nested if question BASH

Just started learning bash ,and I am confused with sintaksis line 16: syntax error near unexpected token `else' thanks #!/bin/bash echo -n "Enter: " read num if(($(echo ${#num}) == 0 )) then echo No arguments passed.Try again elif rem=$(echo $num | tr -d ) ... (7 Replies)
Discussion started by: lio123
7 Replies

9. Shell Programming and Scripting

read line

Hello, I want to read a file line by line and every time i find a sting that starts with: "USER PID PPID %CPU %MEM STARTED TIME VSZ RSS COMMAND" add a sequential number. i.e. "1 USER PID PPID %CPU %MEM STARTED TIME VSZ RSS COMMAND" "2 USER ... (4 Replies)
Discussion started by: LiorAmitai
4 Replies

10. Shell Programming and Scripting

complex if statement syntax without using 'if ..' keyword in ksh.

It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use .. && <statement> || <statement> that perfectly replaces.. if ; then <statement> else <statement> fi Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
Discussion started by: kchinnam
4 Replies

11. Shell Programming and Scripting

[Solved] Show lines above and below!

hello team - anyone can help shwoing how to grep a file showing the lines above and below? Thx Bragabio (7 Replies)
Discussion started by: bragabio
7 Replies

12. Shell Programming and Scripting

quickest way to get the total number of lines in a file

i have a file that's about 2GB, i have to get the total number of lines in this file every 10 minutes. the interval is not an issue. i just need the proper, most efficient way to do this. any ideas? i got the following from another thread on this site, but: awk 'int(100*rand())%5<1'... (12 Replies)
Discussion started by: SkySmart
12 Replies

13. Shell Programming and Scripting

Splitting one line into multiple lines

Hi, I have one problem scenorio as below. my source file is : cat input_file. "hi","there","how","are","you?","It","was","great","working","with","you.","hope","to","work","y ou." my output should be like. "hi","there","how","are","you?", "It","was","great","working","with",... (7 Replies)
Discussion started by: abhilash_nakka
7 Replies

14. UNIX for Dummies Questions & Answers

How to average value if they have the same annotation names?

Hi I have a file like this input_fileCR387793 -0.8 CR387793 -5.5 CR387794 -5.3 CR387795 -0.9 AR388755 -3.0 AR388755 3.8 AR388755 4.5 Each line has annotation name and its correlated value. The annotation name and the value are seperated by a space. I want to average the value if the lines... (4 Replies)
Discussion started by: yuejian
4 Replies

15. Shell Programming and Scripting

Shell scripting syntax

mydate ="$(date)" what is the use of adding double code and parenthesis in the above code .. can i write the same code as mydate= $date (5 Replies)
Discussion started by: lobsang
5 Replies