Sponsored Content
Top Forums Shell Programming and Scripting cygwin executable shell scripts Post 302695101 by jim mcnamara on Saturday 1st of September 2012 10:21:24 AM
Old 09-01-2012
This is because you do not have a shebang on the first line of the script. bash calls exec to run the file, the first thing it does is to get the interpreter from the script. When there is none it behaves differently. In effect: it does not execute the script it reads it.

A shebang is
Code:
#! [interpreter file name like /bin/bash /usr/perl]

The #! goes in the leftmost column (column one) of line one.
ex:
Code:
#!/bin/sh
# code goes here ....

This uses the default shell. In cygwin this is bash.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cygwin shell not coming up

Hi, I installed Cygwin y'day on Win XP SP2. The install went fine but when I clicked on Cygwin's shortcut to invoke its shell, it didn't come up.....was just opening for a fraction of second and then closed. Can anyone please advise? Regards er_ashu (6 Replies)
Discussion started by: er_ashu
6 Replies

2. Shell Programming and Scripting

Can't get Cygwin to run scripts

I haven't been on a unix system in a long time and I'm trying to teach a friend unix. After looking at/testing various options cygwin seemed to be the easiest to download and install. Everything works pretty much as I recall and I even tested a small java program on it. I can't seem to get... (4 Replies)
Discussion started by: mmtemp
4 Replies

3. Shell Programming and Scripting

Need to call an Executable (.exe) using shell

Hi all , I need to call an executable (.exe) using shell script. Actual need is i need to call that shell script and do an export of some tables is there any way . the executable is datamover Please let me know if there are any option !! (2 Replies)
Discussion started by: raghav1982
2 Replies

4. Shell Programming and Scripting

> in cygwin scripts

I'm using cygwin under WinXP. When I write things like ls > list.txt in shell, it works OK. But when I place it to file like this: It says that "list.txt" doesn't exists. I tried touch, but the answer is the same. (2 Replies)
Discussion started by: TeenageWerewolf
2 Replies

5. Shell Programming and Scripting

Cygwin-shell script

hi, I am using Cygwin for running the shell script. If i execute the following command at the prompt output is obtained. grep echo * The same i have put in a file and when am trying to execute it is throwing error. IP.sh echo "Starting command..........." grep echo * ... (9 Replies)
Discussion started by: flamingo_l
9 Replies

6. Shell Programming and Scripting

[SHELL] Executable? Run it!

I would like to make a script that I can see if the file is executable. If it is executable then it needs to run. Otherwise, if it is not executable the file needs to be edited, and run agian. I hope you understand what i mean. :) Thanks for the netherlands (4 Replies)
Discussion started by: dennisbest85
4 Replies

7. UNIX for Dummies Questions & Answers

Help with sorting executable files in shell

Hi!I'm new in this forum,also in shell scripting! :P I'd like to help me with an issue!the project wants to make a variable with a directory(any) and then print all executable files of this directory,sorted by size!Thank you! (8 Replies)
Discussion started by: strawhatluffy
8 Replies

8. UNIX Desktop Questions & Answers

creating an executable file from shell scripts

Hi Friends, I have a shell script which does some operations etc, would it be possible to create an executable file out from this shell script? meaning the executable file is not editable, thus the source code will not be visible to other users for copyright reasons. Please help, thanks! (1 Reply)
Discussion started by: kokoro
1 Replies

9. Programming

CYGWIN executable crash ??

Ok I feel kind of stupid asking since it's been a while since I used an UNIX system but here goes. I recently installed the full CYGWIN on my Windows 7 machine. Seem like a nice package. So to test it out I did the basic hello world deal. It compiles just fine. But when I run it it crashed :(. So I... (4 Replies)
Discussion started by: g8rmark
4 Replies

10. Shell Programming and Scripting

Cygwin shell script

I have a file with below format : 2013-05-20 hello has done 2013-05-20 hi 000abc abc 2013-05-21 thank you I want the out put to be like this : 2013-05-20 hello has done 2013-05-20 hi 000abc abc 2013-05-21 thank you What I could think of is something like this : cat... (7 Replies)
Discussion started by: Sparta
7 Replies
platform::shell(3tcl)					       Tcl Bundled Packages					     platform::shell(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(3tcl)
All times are GMT -4. The time now is 08:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy