Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-09-2011, 03:58 PM
|
#1
|
LQ Newbie
Registered: Aug 2011
Posts: 14
Rep:
|
Help using Cygwin
When I ran my script in Cygwin it gives me the following:
>#!/bin/bash
"#!" is not recognized as an internal or external command operable program or batch file.
>x=0
"x" is not recognized as an internal or external command operable program or batch file. f was unexpected at this time.
>for f in *.sid; do
What should I do?
Last edited by tate89; 08-11-2011 at 05:15 PM.
|
|
|
08-09-2011, 04:37 PM
|
#2
|
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824
|
How did you create this file?
In other words, is it using Windows EOL characters or Unix?
Try running 'dos2unix' on the file and trying again.
|
|
|
08-09-2011, 04:43 PM
|
#3
|
LQ Newbie
Registered: Aug 2011
Posts: 14
Original Poster
Rep:
|
thanks
Last edited by tate89; 08-09-2011 at 04:53 PM.
|
|
|
08-09-2011, 04:52 PM
|
#4
|
LQ Newbie
Registered: Aug 2011
Posts: 14
Original Poster
Rep:
|
dos2unix
AlucardZero thanks for responding.
I have no background in programming. I am very new to it so can you please be very specific with me.
Quote:
Originally Posted by AlucardZero
Try running 'dos2unix' on the file and trying again.
|
I am using windows do I need to download dos2unix?
|
|
|
08-10-2011, 04:16 PM
|
#5
|
LQ Newbie
Registered: Aug 2011
Posts: 14
Original Poster
Rep:
|
dos2unix
I ran dos2unix and that corrected those errors now I'm getting gdal_translate command not found. How do I correct this?
|
|
|
08-10-2011, 04:25 PM
|
#6
|
Member
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825
Rep:
|
Install gdal_translate, it is missing or not in your PATH. Remember, each command is an individual file, it have to be installed. Cygwin is not one fat application that have everything built in.
|
|
|
08-10-2011, 04:47 PM
|
#7
|
LQ Newbie
Registered: Aug 2011
Posts: 14
Original Poster
Rep:
|
yes it is installed and set the path but it is still saying command not found
|
|
|
08-10-2011, 07:46 PM
|
#8
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,643
|
just HOW did you set up the cygwin environment ?
also most of the time Mingw works better on windows
and what is it you are trying to do with gdal that you need to use it in cygwin
when there is a perfictlay good windows build
http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries
also it builds just fine in MinGW and you end up with a MS windows .exe
|
|
|
08-11-2011, 10:00 AM
|
#9
|
LQ Newbie
Registered: Aug 2011
Posts: 14
Original Poster
Rep:
|
I was given the bash script and I was told that I have to run bash in Cygwin.
|
|
|
08-11-2011, 04:03 PM
|
#10
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,643
|
go for it but i had always found cygwin to be very VERY slow
MinGW and it's bash fine ( from 2001 to 2005 i was building Gimp in Mingw )
tested KDE2 in cygwin -- so slow it was unusable.
this script is doing ? something? with gdal
cygwin can also access windows programs but gdal was built in Mingw on windows
now you could use the linux build in cygwin but why .
but if you must .....
install the linux gdal in cygwins ( a guess )
/c/CygWin/
from THE SOURCE CODE and install the full gcc development tree in cygwin
that installed cygwin.exe will have check boxes for it
and ALL of the dependencies for gdal also will need building
unless it is in the cygwin software repo -- it has been a few years since i used it ( mostly used mingw) .
It might be look for it
|
|
1 members found this post helpful.
|
08-11-2011, 05:14 PM
|
#11
|
LQ Newbie
Registered: Aug 2011
Posts: 14
Original Poster
Rep:
|
Thanks
I tried installing linux gdal but ran into problems once I added the full path of gdal to my script it worked fine.
|
|
|
All times are GMT -5. The time now is 12:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|