FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 01-04-2012, 07:01 AM
Marvin Kosmal
 
Default dumb question

On Tue, Jan 3, 2012 at 11:53 PM, Ed Greshko <Ed.Greshko@greshko.com> wrote:

On 01/04/2012 03:51 PM, Marvin Kosmal wrote:

> What is in killfox??



A shell script to kill firefox when it used to give me problems a while

back. *All it contains is....



killall -6 firefox-bin

killall -6 plugin-container



but it saved me typing.



--




HI

Something is wrong here..

It is late at night and I can't put my finger on it..


You have an executable file and it does not execute?

Change to -x* and use sh filename and it does not execute?

It does not work that way here......

You are doing something and I can't see it..


YMMV

Marvin





Ask away: http://ask.fedoraproject.org




--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:06 AM
Ed Greshko
 
Default dumb question

On 01/04/2012 03:59 PM, Paul Allen Newell wrote:
> Though I really appreciate both of your replies, I am looking at them
> and seeing that Marvin is saying it needs to be "+x" and Ed is saying
> it doesn't. I ran a test and "-x" seems to work.

FYI, Marvin corrected himself saying....

Sorry..

My bad...

The make is +x..

>
> For questions on my syntax of "*.sh", I have believed since my
> earliest days that a shell file (be it ".sh", ".csh", ".tcsh", or
> ".bash") that it has to be "+x" as it is an executable. If I am
> incorrect, I would love to know, though it may take me a day or two to
> adjust to the news that the earth shifted polarity (smile)

If you want them to be directly executable, yes. But if you call them
as input to a shell they need not be.

If you have them as executable you can control what shell is used by the
first line in the file.

As I mentioned earlier, I've got a shell script called killfox. The
first line contains "#!/bin/bash" which means it is a "bash" script. I
could change it to ""#!/bin/tcsh" and it would be interpreted as a tcsh
script.





--
A common mistake that people make when trying to design something
completely foolproof was to underestimate the ingenuity of complete
fools. -- Douglas Adams in "Mostly Harmless
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:07 AM
Marvin Kosmal
 
Default dumb question

On Tue, Jan 3, 2012 at 11:59 PM, Paul Allen Newell <pnewell@cs.cmu.edu> wrote:

On 1/3/2012 11:42 PM, Marvin Kosmal wrote:










HI



Sorry..



My bad...



The make is +x..



Marivn






Marvin and Ed:



Though I really appreciate both of your replies, I am looking at them and seeing that Marvin is saying it needs to be "+x" and Ed is saying it doesn't. I ran a test and "-x" seems to work.



For questions on my syntax of "*.sh", I have believed since my earliest days that a shell file (be it ".sh", ".csh", ".tcsh", or ".bash") that it has to be "+x" as it is an executable. If I am incorrect, I would love to know, though it may take me a day or two to adjust to the news that the earth shifted polarity (smile)




Thanks,

Paul





Paul

Apples and Oranges..

If you use sh...* In the command line.** as


sh ./filename**** The file does not need to be executable.

if you do

./filename**** You need to have the* x bit set...



And I agree with you.. When I write shell scripts I use a .sh extension.* Just to make it easy on myself.. It help me identify .sh from .txt files..

HTH

Marvin

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:08 AM
Ed Greshko
 
Default dumb question

On 01/04/2012 04:01 PM, Marvin Kosmal wrote:
>
>
> On Tue, Jan 3, 2012 at 11:53 PM, Ed Greshko <Ed.Greshko@greshko.com
> <mailto:Ed.Greshko@greshko.com>> wrote:
>
> On 01/04/2012 03:51 PM, Marvin Kosmal wrote:
> > What is in killfox??
>
> A shell script to kill firefox when it used to give me problems a
> while
> back. All it contains is....
>
> killall -6 firefox-bin
> killall -6 plugin-container
>
> but it saved me typing.
>
> --
>
>
>
>
> HI
>
> Something is wrong here..
>
> It is late at night and I can't put my finger on it..
>
> You have an executable file and it does not execute?

It executes just fine....in both cases.

The output is

firefox-bin: no process found
plugin-container: no process found

Since I'm currently not running firefox...

>
> Change to -x and use sh filename and it does not execute?
>
> It does not work that way here......
>
> You are doing something and I can't see it..
>

The full script is....

[egreshko@meimei bin]$ cat killfox
#!/bin/bash
killall -6 firefox-bin
killall -6 plugin-container



--
A common mistake that people make when trying to design something
completely foolproof was to underestimate the ingenuity of complete
fools. -- Douglas Adams in "Mostly Harmless
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:11 AM
Ed Greshko
 
Default dumb question

On 01/04/2012 04:07 PM, Marvin Kosmal wrote:
> And I agree with you.. When I write shell scripts I use a .sh
> extension. Just to make it easy on myself.. It help me identify .sh
> from .txt files..

My point is simply that .sh or any other extension is meaningless to the
OS. It may be helpful to the humans. FWIW, I never use extensions.
Just not something that I find necessary. I also found it confused some
people coming from the M$ world. Again, just my practice.

--
A common mistake that people make when trying to design something
completely foolproof was to underestimate the ingenuity of complete
fools. -- Douglas Adams in "Mostly Harmless
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:14 AM
Paul Allen Newell
 
Default dumb question

[inline]

On 1/4/2012 12:06 AM, Ed Greshko wrote:

On 01/04/2012 03:59 PM, Paul Allen Newell wrote:

Though I really appreciate both of your replies, I am looking at them
and seeing that Marvin is saying it needs to be "+x" and Ed is saying
it doesn't. I ran a test and "-x" seems to work.

FYI, Marvin corrected himself saying....

Sorry..

My bad...

The make is +x..


So I should chmod all {M,m}akefile(s) to rwxr-x-r-x?


For questions on my syntax of "*.sh", I have believed since my
earliest days that a shell file (be it ".sh", ".csh", ".tcsh", or
".bash") that it has to be "+x" as it is an executable. If I am
incorrect, I would love to know, though it may take me a day or two to
adjust to the news that the earth shifted polarity (smile)

If you want them to be directly executable, yes. But if you call them
as input to a shell they need not be.


That's new to me, thank you


If you have them as executable you can control what shell is used by the
first line in the file.

As I mentioned earlier, I've got a shell script called killfox. The
first line contains "#!/bin/bash" which means it is a "bash" script. I
could change it to ""#!/bin/tcsh" and it would be interpreted as a tcsh
script.

I have been including the "$!/bin/whatever" for the longest time as
there are some things that I find easier to do in {sh,tcsh,bash} and
want to force that. The tcsh is the biggest problem in my life owing to
its legacy ... I'd kick over to bash if it weren't for the fact that
third party are stuck in the history of tcsh. I don't have any issue
with either tcsh or bash, but I gotta live with the difference.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:17 AM
Ed Greshko
 
Default dumb question

On 01/04/2012 04:14 PM, Paul Allen Newell wrote:
> [inline]
>
> On 1/4/2012 12:06 AM, Ed Greshko wrote:
>> On 01/04/2012 03:59 PM, Paul Allen Newell wrote:
>>> Though I really appreciate both of your replies, I am looking at them
>>> and seeing that Marvin is saying it needs to be "+x" and Ed is saying
>>> it doesn't. I ran a test and "-x" seems to work.
>> FYI, Marvin corrected himself saying....
>>
>> Sorry..
>>
>> My bad...
>>
>> The make is +x..
>
> So I should chmod all {M,m}akefile(s) to rwxr-x-r-x?

I've already demonstrated that it isn't necessary.....


>
>>> For questions on my syntax of "*.sh", I have believed since my
>>> earliest days that a shell file (be it ".sh", ".csh", ".tcsh", or
>>> ".bash") that it has to be "+x" as it is an executable. If I am
>>> incorrect, I would love to know, though it may take me a day or two to
>>> adjust to the news that the earth shifted polarity (smile)
>> If you want them to be directly executable, yes. But if you call them
>> as input to a shell they need not be.
>
> That's new to me, thank you

Welcome...

>
>> If you have them as executable you can control what shell is used by the
>> first line in the file.
>>
>> As I mentioned earlier, I've got a shell script called killfox. The
>> first line contains "#!/bin/bash" which means it is a "bash" script. I
>> could change it to ""#!/bin/tcsh" and it would be interpreted as a tcsh
>> script.
>>
> I have been including the "$!/bin/whatever" for the longest time as
> there are some things that I find easier to do in {sh,tcsh,bash} and
> want to force that. The tcsh is the biggest problem in my life owing
> to its legacy ... I'd kick over to bash if it weren't for the fact
> that third party are stuck in the history of tcsh. I don't have any
> issue with either tcsh or bash, but I gotta live with the difference.

Sure, I also have some old stuff that needs tcsh.

--
A common mistake that people make when trying to design something
completely foolproof was to underestimate the ingenuity of complete
fools. -- Douglas Adams in "Mostly Harmless
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:17 AM
Paul Allen Newell
 
Default dumb question

On 1/4/2012 12:11 AM, Ed Greshko wrote:

FWIW, I never use extensions.

Ed:

Though I can't stand the MS world of extensions meaning something, I
can't imagine not using extensions to help understand what is there. The
system shouldn't give a damn, but the user needs all the help he/she can
get (smile)


Paul

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:19 AM
Ed Greshko
 
Default dumb question

On 01/04/2012 04:17 PM, Paul Allen Newell wrote:
> Though I can't stand the MS world of extensions meaning something, I
> can't imagine not using extensions to help understand what is there.
> The system shouldn't give a damn, but the user needs all the help
> he/she can get (smile)

Sure, and if someone chooses to use them that is their choice. I don't
bash (pun intended) them for it. I just make sure that the new people I
run into (at work) know that it isn't necessary.

--
A common mistake that people make when trying to design something
completely foolproof was to underestimate the ingenuity of complete
fools. -- Douglas Adams in "Mostly Harmless
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-04-2012, 07:22 AM
Paul Allen Newell
 
Default dumb question

On 1/4/2012 12:17 AM, Ed Greshko wrote:



FYI, Marvin corrected himself saying....

Sorry..

My bad...

The make is +x..

So I should chmod all {M,m}akefile(s) to rwxr-x-r-x?

I've already demonstrated that it isn't necessary.....


And that's the confusion on my end. You are stating that Marvin says
"make it +x" and you are saying it doesn't need to be. I asked this dumb
question to find out how I should treat this situation regardless of
"what works". Its about understanding whether a makefile is an
executable or if make is just treating it as input and the executable
part is under the hood.


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 09:00 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org