LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 08-09-2011, 03:58 PM   #1
tate89
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Rep: Reputation: Disabled
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.
 
Old 08-09-2011, 04:37 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
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.
 
Old 08-09-2011, 04:43 PM   #3
tate89
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
thanks

Last edited by tate89; 08-09-2011 at 04:53 PM.
 
Old 08-09-2011, 04:52 PM   #4
tate89
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
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 View Post
Try running 'dos2unix' on the file and trying again.
I am using windows do I need to download dos2unix?
 
Old 08-10-2011, 04:16 PM   #5
tate89
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
dos2unix

I ran dos2unix and that corrected those errors now I'm getting gdal_translate command not found. How do I correct this?
 
Old 08-10-2011, 04:25 PM   #6
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
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.
 
Old 08-10-2011, 04:47 PM   #7
tate89
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
yes it is installed and set the path but it is still saying command not found
 
Old 08-10-2011, 07:46 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,643

Rep: Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653
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
 
Old 08-11-2011, 10:00 AM   #9
tate89
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
I was given the bash script and I was told that I have to run bash in Cygwin.
 
Old 08-11-2011, 04:03 PM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,643

Rep: Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653
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.
Old 08-11-2011, 05:14 PM   #11
tate89
LQ Newbie
 
Registered: Aug 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thanks
I tried installing linux gdal but ran into problems once I added the full path of gdal to my script it worked fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could I get rid of Cygwin.dll/Cygwin1.dll in program compiled under Cygwin ? Kunsheng Programming 1 05-17-2009 09:30 PM
Have you ever used cygwin, i've met a problem with the command stat from cygwin andy820303 Linux - Newbie 0 03-11-2009 04:37 AM
Cygwin LHinsch Linux - Software 1 10-31-2007 10:42 AM
cygwin zchoyt Linux - General 1 08-24-2005 02:03 PM
CygWin SpEcIeS Linux - General 1 02-17-2005 04:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration