loop « include « C File Q&A

Home
C File Q&A
1.array
2.binary
3.delete
4.Development
5.directory
6.fgets
7.fopen
8.fprintf
9.fscanf
10.fwrite
11.header
12.include
13.input
14.LINE
15.linux
16.open
17.output
18.pointer
19.read
20.size
21.string
22.struct
23.Text
24.windows
25.write
C File Q&A » include » loop 

1. C header file loops    stackoverflow.com

I have a couple of header files, which boil down to:

tree.h:
#include "element.h"

typedef struct tree_
{
    struct *tree_ first_child;
    struct *tree_ next_sibling;
    int tag;
 ...

2. bash for loop includes wild characters (*.c) if no files with extension .c. How do I get around?    stackoverflow.com

I am using bash on UNIX (sparc 10)

for file in $SCPATH/$LIBNAME/*.{gob,c,cpp,h};
do
    ln -s $file;
done;
The problem is: if there are no files with extension 'c', it will put ".c" ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.