05-28-2010
Not that pointless IMHO. Several traditional Unix utilities are expecting all lines to be completed and will silently ignore the last one if unterminated. Also concatenating such C source files might break both their syntax and on screen readability.
This problem was mostly academic during decades when all the editors were correctly finishing every line by a new-line character but happens now from time to time with either automatically or exotic editor generated code.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
i have a variable with lots of tokens seperated with spaces.
e.g VAR="ABC DEF GHSD GHQS TUTSD JHDTQ QDHQ CDQKDGQ WQUTQD DQUTQD DQJGDQ QDTQD WDQUTQDU QDUGQD QDJGQD DQUTDUQ QDUIDTQ"
i want to separate all of the above tokens and call a script with each of the token e.g sh script.sh <TOKEN>... (4 Replies)
Discussion started by: skyineyes
4 Replies
2. UNIX for Advanced & Expert Users
Hi,
I need help with using an awk or sed filter on the below line
ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE
Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies
3. UNIX for Dummies Questions & Answers
Hi Experts,
I want to print the lines whose third field in non-empty/blank space.
i.e.
INPUT FILE/B]
dcdccghjrry0yd cont
dcdccttrk820529 cont rdekedfsSCr
dcdccttrdky2d0y cont rdekedfsSC2 ... (3 Replies)
Discussion started by: krao
3 Replies
4. Shell Programming and Scripting
Hi,
Can you please tell me how to add empty columns at the end csv file?
Currently there are 6 columns in the csv file. I want to add 35 empty columns at the end of this csv file.
Thanks,
Tushar (17 Replies)
Discussion started by: Tushar Bendale
17 Replies
5. UNIX for Advanced & Expert Users
Hi All,
I am facing an issue in one of the use cases that I am trying to implement.
I am getting a purchase order from one of the trading partners through Oracle B2B.
B2B forwards this B2BM (B2B message ) to AIAB2BInterface. From AIAB2BInterface my BPEL process gets invoked, which in turn... (1 Reply)
Discussion started by: mayank2211
1 Replies
6. UNIX for Dummies Questions & Answers
I'm trying to remove all of the empty lines at the end of a Tab delimited file. They have no data just tabs.
I've tried may things, here are a couple:
sed /^\t.\t/d File1 > File2
sed /^\t{44}/d File1 > File2
What am I missing? (9 Replies)
Discussion started by: SirHenry1
9 Replies
7. Solaris
Hi all,
I have written the following program and run on both T5440 and T5220 on same OS version. I found that T5540 server takes more time than T5220. Please find below the details.
test1.cpp
#include <iostream>
#include <pthread.h>
using namespace std;
#define NUM_OF_THREADS 20... (17 Replies)
Discussion started by: sanjay_singh85
17 Replies
8. Linux
I have a .CSV file (lets say named as file.csv) with numeric and string values. The string might contain commas hence they are enclosed in double quotes as in the below format.
column1,column2,column3,column4,column5,column6,column7
12,455,"string, with, quotes, and with, commas, in... (3 Replies)
Discussion started by: dhruuv369
3 Replies
9. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
10. UNIX for Dummies Questions & Answers
Hi Folks,
I have a requirement to develop a shell script. PFB my requirement,
Requirement:
I need to check an empty line after the end of each header in respective file and if a empty line is present simply echo file OK and if empty line is not present echo "Adding empty line" and add an... (6 Replies)
Discussion started by: tpk
6 Replies
CTAGS(1) General Commands Manual CTAGS(1)
NAME
ctags - Generates "tags" and (optionally) "refs" files
SYNOPSIS
ctags [-stvra] filesnames...
DESCRIPTION
ctags generates the "tags" and "refs" files from a group of C source files. The "tags" file is used by Elvis' ":tag" command, control-]
command, and -t option. The "refs" file is sometimes used by the ref(1) program.
Each C source file is scanned for #define statements and global function definitions. The name of the macro or function becomes the name
of a tag. For each tag, a line is added to the "tags" file which contains:
- the name of the tag
- a tab character
- the name of the file containing the tag
- a tab character
- a way to find the particular line within the file.
The filenames list will typically be the names of all C source files in the current directory, like this:
$ ctags -stv *.[ch]
OPTIONS
-t Include typedefs. A tag will be generated for each user-defined type. Also tags will be generated for struct and enum names.
Types are considered to be global if they are defined in a header file, and static if they are defined in a C source file.
-v Include variable declarations. A tag will be generated for each variable, except for those that are declared inside the body of a
function.
-s Include static tags. Ctags will normally put global tags in the "tags" file, and silently ignore the static tags. This flag causes
both global and static tags to be added. The name of a static tag is generated by prefixing the name of the declared item with the
name of the file where it is defined, with a colon in between. For example, "static foo(){}" in "bar.c" results in a tag named
"bar.c:foo".
-r This causes ctags to generate both "tags" and "refs". Without -r, it would only generate "tags".
-a Append to "tags", and maybe "refs". Normally, ctags overwrites these files each time it is invoked. This flag is useful when you
have to many files in the current directory for you to list them on a single command-line; it allows you to split the arguments
among several invocations.
FILES
tags A cross-reference that lists each tag name, the name of the source file that contains it, and a way to locate a particular line in
the source file.
refs The "refs" file contains the definitions for each tag in the "tags" file, and very little else. This file can be useful, for exam-
ple, when licensing restrictions prevent you from making the source code to the standard C library readable by everybody, but you
still everybody to know what arguments the library functions need.
BUGS
ctags is sensitive to indenting and line breaks. Consequently, it might not discover all of the tags in a file that is formatted in an
unusual way.
SEE ALSO
elvis(1), refs(1)
AUTHOR
Steve Kirkendall
kirkenda@cs.pdx.edu
CTAGS(1)