Sponsored Content
Full Discussion: K&R C code edits
Homework and Emergencies Homework & Coursework Questions K&R C code edits Post 302562892 by theexitwound on Saturday 8th of October 2011 08:20:35 PM
Old 10-08-2011
But if the lines are split on the first -e expression, there should only be one function per line when the second -e expression is matched, shouldn't it?
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help with scripting mass file edits..

Hello, I am wanting to know a way to shell (ksh)script-edit a file by having a script that searches for a specific string, and then input lines of text in the file after that specific string. Please help, as I will be up all night if I can't figure this out. (16 Replies)
Discussion started by: LinuxRacr
16 Replies

2. Shell Programming and Scripting

Multiple edits to a bunch of html files

I'm trying to upgrade a whole bunch of pages on my site to a new design. I thought one way of doing it would be to enclose the content in special comment tags and then use some form of script to wrap the new html around it. Like this: <!-- content start --> <h1>Blah blah blah</h1> yada yada... (9 Replies)
Discussion started by: dheian
9 Replies

3. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

4. UNIX for Dummies Questions & Answers

Compile & Run Java Code

The java program is a part of speech tagger -> The Stanford NLP (Natural Language Processing) Group The goal is to use this script as part of a webpage to tag parts of speech based on a user-inputted string. I have no idea what to do with the files - I'm a complete *nix noob. I tried running... (4 Replies)
Discussion started by: tguillea
4 Replies

5. UNIX for Dummies Questions & Answers

OpenLDAP DB_CONFIG edits, changes live? or do I need run something

So I am probably missing something , but when I made edits to my DB_CONFIG file to fix form db_lock issues, the changes are not propagating after a service restart. Anyone know if I need to run anything else, or are the changes live? (0 Replies)
Discussion started by: jcejka
0 Replies

6. Shell Programming and Scripting

Problem with call of Java Programm & return code handling & output to several streams.

Hello Everybody, thanks in advance for spending some time in my problem. My problem is this: I want to call a java-Programm out of my shell skript, check if die return code is right, and split the output to the normal output and into a file. The following code doesn't work right, because in... (2 Replies)
Discussion started by: danifunny
2 Replies

7. UNIX for Dummies Questions & Answers

multiple text edits inone pass

File_1 looks like: bunch of text Untitled Placemark bunch of text bunch of text Untitled Placemark bunch of text bunch of text Untitled Placemark bunch of text File_2 looks like: Title_001 Title_002 Title_003 First: I need to replace the 1st occurence of "Untitled Placemark"... (2 Replies)
Discussion started by: kenneth.mcbride
2 Replies

8. Shell Programming and Scripting

SFTP Shell Script Get & Delete && Upload & Delete

Hi All, Do you have any sample script, - auto get file from SFTP remote server and delete file in remove server after downloaded. - only download specify filename - auto upload file from local to SFTP remote server and delete local folder file after uploaded - only upload specify filename ... (3 Replies)
Discussion started by: weesiong
3 Replies
CC(1)							      General Commands Manual							     CC(1)

NAME
cc - C compiler (2BSD) SYNOPSIS
cc [ option ] ... file ... DESCRIPTION
Cc is the UNIX C compiler. Cc accepts several types of arguments: Arguments whose names end with `.c' are taken to be C source programs; they are compiled, and each object program is left on the file whose name is that of the source with `.o' substituted for `.c'. The `.o' file is normally deleted, however, if a single C program is compiled and loaded all at one go. In the same way, arguments whose names end with `.s' are taken to be assembly source programs and are assembled, producing a `.o' file. The following options are interpreted by cc. See ld(1) for load-time options. -c Suppress the loading phase of the compilation, and force an object file to be produced even if only one program is compiled. -w Suppress warning diagnostics. -p Arrange for the compiler to produce code which counts the number of times each routine is called. If loading takes place, replace the standard startup routine by one which automatically calls monitor(3) at the start and arranges to write out a mon.out file at normal termination of execution of the object program. An execution profile can then be generated by use of prof(1). -O Invoke an object-code improver. -S Compile the named C programs, and leave the assembler-language output on corresponding files suffixed `.s'. -M Run only the macro preprocessor on the named C programs, requesting it to generate Makefile dependencies and send the result to the standard output. -E Run only the macro preprocessor on the named C programs, and send the result to the standard output. -C prevent the macro preprocessor from eliding comments. -o output Name the final output file output. If this option is used the file `a.out' will be left undisturbed. -Dname=def -Dname Define the name to the preprocessor, as if by `#define'. If no definition is given, the name is defined as "1". -Uname Remove any initial definition of name. -Idir `#include' files whose names do not begin with `/' are always sought first in the directory of the file argument, then in directo- ries named in -I options, then in directories on a standard list. -Ldir Library archives are sought first in directories named in -L options, then in directories on a standard list. -Bstring Find substitute compiler passes in the files named string with the suffixes cpp, c0, c1 and c2. If string is empty, use a standard backup version. -t[p012] Find only the designated compiler passes in the files whose names are constructed by a -B option. In the absence of a -B option, the string is taken to be `/usr/c/'. Other arguments are taken to be either loader option arguments, or C-compatible object programs, typically produced by an earlier cc run, or perhaps libraries of C-compatible routines. These programs, together with the results of any compilations specified, are loaded (in the order given) to produce an executable program with name a.out. FILES
file.c input file file.o object file a.out loaded output /tmp/ctm? temporary /lib/cpp preprocessor /lib/c[01] compiler /lib/c2 optional optimizer /lib/crt0.o runtime startoff /lib/mcrt0.o startoff for profiling /lib/libc.a standard library, see intro(3) /usr/lib/libc_p.aprofiling library, see intro(3) /usr/include standard directory for `#include' files mon.out file produced for analysis by prof(1) SEE ALSO
B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall, 1978 B. W. Kernighan, Programming in C--a tutorial D. M. Ritchie, C Reference Manual monitor(3), prof(1), adb(1), ld(1), as(1) DIAGNOSTICS
The diagnostics produced by C itself are intended to be self-explanatory. Occasional messages may be produced by the assembler or loader. BUGS
The compiler currently ignores advice to put char, unsigned char, long, float, or double variables in registers. 3rd Berkeley Distribution June 7, 1985 CC(1)
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy