The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
"include" directory is not there Katkota UNIX for Dummies Questions & Answers 10 01-02-2008 12:07 AM
How can I tranfer an OS/ Unix (from old HD to new HD / include all files saved ) Vietnam UNIX for Dummies Questions & Answers 0 08-04-2006 11:27 PM
how to include external files in tcsh umen Shell Programming and Scripting 0 12-07-2005 05:54 AM
moving files from a unix directory to a windows directory gleads UNIX for Dummies Questions & Answers 2 08-29-2002 08:42 PM
Include files reddyb High Level Programming 3 06-27-2001 10:38 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-14-2006
fredao fredao is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 59
include all files under a directory

I want to include all the subnet files under /etc/dhcpd/ to /etc/dhcpd.conf

so here is my content of dhcpd.conf

...
include "/etc/dhcpd/*";


however, the check-syntax reports syntax error, as they do not recognize the wildcard *, and display that " file /etc/dhcpd/* could not be found.

how can I use wildcard to refer to all the files in this directory?
  #2 (permalink)  
Old 12-15-2006
fredao fredao is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 59
Thumbs up

is there any idea?
  #3 (permalink)  
Old 12-15-2006
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
Code:
for dr in *
do
    echo "include $PWD/$dr;"
done
Copy the output of the above code and paste in to your file
  #4 (permalink)  
Old 12-15-2006
fredao fredao is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 59
Quote:
Originally Posted by anbu23
Code:
for dr in *
do
    echo "include $PWD/$dr;"
done
Copy the output of the above code and paste in to your file

This is not the way I expect;
In addition, your code produce the following:

include /home/htao/trial/new/*;
  #5 (permalink)  
Old 12-16-2006
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
Quote:
Originally Posted by fredao
This is not the way I expect;
In addition, your code produce the following:

include /home/htao/trial/new/*;
Code:
cd /etc/dhcpd/
for dr in *
do
    echo "include $PWD/$dr;"
done
First move the directory where you have the files to include
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0