ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ZURICK .htm
cat: ZURICK: No such file or directory
cat: .htm: No such file or directory
ZURICK2 .htm
cat: ZURICK2: No such file or directory
cat: .htm: No such file or director
ZURICK3 .htm
cat: ZURICK3: No such file or directory
cat: .htm: No such file or director
I am bumping on such easy stuff
--
same for this with sh:
Quote:
File=`echo "$(ls *.htm)" `
echo $File
for each in $File ; do cat $File ; done
--
this not working either :
Quote:
File=`echo "$(ls *.htm)" `
echo $File
for each in "$File" ; do echo "$each" ; cat "$each" ; done
By the way, it is with cygwin
Last edited by frenchn00b; 10-02-2007 at 01:40 PM.
This puts literal double quotes around $0, making it part of file.
This: for each in "$File" ; do echo "$each" ; cat "$each" ; done
Should be: for each in $File; do echo $each; cat "$each" ;done
The double quotes around $File should not be there. Otherwise $File would have one entry only, namely the whole string that the ls command came up with.
BTW: Why use: File=`echo "$(ls *.htm)" ?
Wouldn't: File=*htm be easier or File="`ls *htm`" if you want more readability.
I'm asking because all that is done in getthelinkinto.sh can also be done inside the script that calls getthelinkinto.sh. Seems like a hard way to do things.
I'm asking because all that is done in getthelinkinto.sh can also be done inside the script that calls getthelinkinto.sh. Seems like a hard way to do things.
In the getthelinkinto.sh, there is:
Code:
#!/bin/sh
echo "$1"
For the moment, just bit of training with spaces, ... since I made already a script but got it wrong with spaces problems. I removed all and started from begining to learn space stuffs.
THanks a lot for support. Btw, awk rocks really !!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.