« first day (1505 days earlier)      last day (3453 days later) » 

2:32 AM
Anyone running debian around?
@FaheemMitha --^?
 
3:13 AM
:(
 
Hi @Seth, what's happening?
 
@FaheemMitha Hi!
Could you open a python interpreter and run this for me?
import platform
platform.dist()
I'm not running debian but I need to know what it identifies as for a program I'm writing :)
 
>>> platform.dist()
('debian', '7.7', '')
 
('debian', '7.7', '')
 
Debian wheezy.
 
3:20 AM
Thank you!
 
 
10 hours later…
12:50 PM
Hi guys.
 
 
3 hours later…
3:34 PM
hi @terdon I have a question about one of your answers
I am referring to your post on this thread: unix.stackexchange.com/questions/159513/…
first of all, it's a great answer, specially for beginners like myself, so thank you for it
the question I have is,
while in your introductory sentences you don't list "!" as an operator but then go on to explain it as one
I haven't read the whole bash manual yet but in the "definitions" section "!" is not listed as an (control) operator
can you comment on that - whether "!" is a control operator or not..?
p.s. i should have commented on that post but unfortunately don't have enough rep points yet to do so..
 
@Lavya I had copied the list from here which did not include !. The ! was added in a later edit by Gilles who forgot to add it to the first list. I have now done so.
So, yes, as far as I know, ! is also an operator.
My guess is that they simply forgot to include it in the list, I don't see what else it can be if it's not an operator.
Section 3.2.4.2 of the bash manual does actually call it an operator:
> Expressions may be combined using the following operators, listed in decreasing order of precedence:

> ! expression
>
> True if expression is false.
 
3:55 PM
@terdon Thank you so much for your quick reply
As for the mention in the section 3.2.4.2, you may notice that they also refer to == , != and such as operator
 
@Lavya You're welcome :)
 
might it be that they mean "arithmetic operator" as described in section 6.5 (or some other kind that I'm not aware of yet), instead of bash control operators..?
@terdon also, while trying on the shell itself, "!' seems to have some other function - it expands the command by comparing it with commands from history , so I haven't been able to use it as a control operator as in the case of say && and ||
by typing something like say !true && echo hello . do you have an idea how we can use it as one..?
 
@Lavya Ah, no there it is interpreted as a history command. You can do things like this:
$ foo="aa"
$ [ ! "$foo" = "bb" ] && echo "foo is not bb"
foo is not bb
It negates the command in the [ ] construct.
It is essentially equivalent to a not so the only thing you can call it is a control operator but it can only be used ins specific contexts and that complicates the terminology. I don't really know what to call it and control operator is probably the best choice.
 
4:29 PM
@ terdon yes, but inside [ ] - is that enough to classify it along with operators directly interpreted by shell called control operators?
in your original reply (on the thread linked above), you mentioned ! command1
can you give one such example..? where the shell return value (accessed by $?) is toppled?
 
4:46 PM
@Lavya Well, yes. The one I gave above: [ ! "$foo" = "bb" ] && echo "foo is not bb"
$ foo="aa"
$ [ "$foo" = "bb" ]&
$ echo $?
0
 
5:12 PM
@terdon thanks! but I suppose that should come under "[" which is a builtin command under shell, not the shell itself. I have to admit though that I am a bit confused at the moment so instead of bothering you with the definitions even more, I think I should go through the manual and try things out a bit. Thank you so much once again for taking the time and replying impromptu!
 
@Lavya You're very welcome. You might very well be right and the ! is only an operator inside the test builtin. I'll have to think about whether there are any other examples.
 
 
2 hours later…
7:20 PM
@Braiam can you tell me what you see when you look at this answer?
Is it the "This answer has been removed for reasons of moderation blah blah" message or do you see the answer itself?
 
7:49 PM
> This answer was marked as spam or offensive and is therefore not shown - you can see the revision history for details
> locked by Community♦ 52 mins ago
deleted by Community♦ 52 mins ago
I suppose you deleted it using spam flag
 
@Braiam Cool, thanks.
Yes I did but, as I just found out, mods don't see that message, I still see the original post.
 
smells feature request
 
Nah, it's fine that way now that I've confirmed it looks OK to non-mods.
 

« first day (1505 days earlier)      last day (3453 days later) »