-
as seen on Ask Ubuntu
- Search for 'Ask Ubuntu'
When I run a program from the console, e.g.
me@box:~$ firefox
I expect the console to log error messages (I think this is std out or std err?) and other items from the program, firefox in this case.
But today I notice that bash just opens the program and goes to a new prompt, e.g.
me@box:~$…
>>> More
-
as seen on Ask Ubuntu
- Search for 'Ask Ubuntu'
I was updating my .bash_profile, and unfortunetly I made a few updates and now I am getting:
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
-bash: tar: command…
>>> More
-
as seen on Ask Ubuntu
- Search for 'Ask Ubuntu'
I was updating my .bash_profile, and unfortunetly I made a few updates and now I am getting:
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
-bash: tar: command…
>>> More
-
as seen on Super User
- Search for 'Super User'
ps -e | grep bash
sample output from a linux machine:
1128 pts/14 00:00:00 bash
7491 pts/7 00:00:00 bash
12651 pts/14 00:00:00 bash
16145 pts/2 00:00:00 bash
sample output from a mac machine:
58352 ttys000 0:00.09 login -pfl username /bin/bash -c exec -la bash /bin/bash
58353 ttys000…
>>> More
-
as seen on Ask Ubuntu
- Search for 'Ask Ubuntu'
First login process name seems to be set to "-bash", but if I subshell then it becomes "bash". for example:
root@nowere:~# echo $0
-bash
root@nowere:~# bash
root@nowere:~# echo $0
bash
-bash is causing some scripts to fail, such as . /usr/share/debconf/confmodule
exec /usr/share/debconf/frontend…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I have two files nodes_to_delete and nodes_to_keep. Each file has a many lines with numeric ids.
I want to have the list of numeric ids that are in nodes_to_delete but NOT in nodes_to_keep.
Adam
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm doing a set difference operation in Python:
from sets import Set
from mongokit import ObjectId
x = [ObjectId("4f7aba8a43f1e51544000006"), ObjectId("4f7abaa043f1e51544000007"), ObjectId("4f7ac02543f1e51a44000001")]
y = [ObjectId("4f7acde943f1e51fb6000003")]
print list(Set(x).difference(Set(y)))
I'm…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have two collections a and b. I would like to compute the set of items in either a or b, but not in both (a logical exclusive or). With LINQ, I can come up with this:
IEnumerable<T> Delta<T>(IEnumerable<T> a, IEnumerable<T> b)
{
return a.Except (b).Union (b.Except (a));
}
I…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to select records with a statement
SELECT *
FROM A
WHERE
LEFT(B, 5) IN
(SELECT * FROM
(SELECT LEFT(A.B,5), COUNT(DISTINCT A.C) c_count
FROM A
GROUP BY LEFT(B,5)
) p1
WHERE p1.c_count = 1
)
AND C IN
(SELECT * FROM
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
How can I get the set difference of two result sets?
Say I have a result set (just one column in each):
result1:
'a'
'b'
'c'
result2:
'b'
'c'
I want to minus what is in result1 by result2: result1 - result2 such that it equals:
difference of result1 - result2:
'a'
>>> More