![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| read files from folder and then call another script | girishnn | UNIX and Linux Applications | 1 | 11-08-2007 09:52 PM |
| read files from folder and then call another script | girishnn | Shell Programming and Scripting | 3 | 11-06-2007 06:53 PM |
| Help!! Need script to read files and add values by lines... | dhuertas | Shell Programming and Scripting | 3 | 09-15-2007 11:14 PM |
| How to make a cshell (csh) script interactive | jimmynath | Shell Programming and Scripting | 2 | 09-07-2005 01:28 PM |
| Script with read/write Files | steiner | Shell Programming and Scripting | 5 | 07-25-2003 10:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
help with cshell script to read 1 or more lex files
taskes one or more .l files and compiles them
#!/usr/bin/csh #while loop to carry on asking user to enter the files while $number!=0 echo "enter file name" #check to see if file ends with .l #if file ends with .l compile lexx.yy.c file for each file this is how i think it needs to be done but im not sure????? can ne1 help me |
|
||||
|
Do you mean files with suffix name .l ?
Here is bash's implementation(Csh is similar to it): Code:
#!/bin/sh
while read -a lfiles -p "Enter files to process:"; do
for file in "${lfiles[@]}";do
if[ "${file##*.}" == "l" ];then
# Place your compilation procedure here
fi
done
done
Last edited by home_king; 04-18-2004 at 10:06 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|