« first day (2850 days earlier)      last day (2402 days later) » 

07:20
@Jesse_b That would be the /history tag.
/command-history is for questions relating to the command line history, as in the recently entered interactive commands.
 
4 hours later…
11:20
Does anyone know how to correctly grep for the string "\Sig"? I assume the `` is causing the problem.
I see this has been asked already:
0
Q: How can I search for a string with a literal backslash when using grep?

TimI would like to search \G string including the backslash with grep. $ echo "\G\\G" > /tmp/test $ grep '\G' /tmp/test \G\G $ grep '\\G' /tmp/test \G\G $ grep "\\G" /tmp/test \G\G $ grep "\G" /tmp/test \G\G Also see the screenshot below for the matches in red: I was wondering why only '\\...

12:11
@FaheemMitha Double up the \ in the pattern.
@Kusalananda So I learned. But I don't know why '\\Sig' works, and "\\Sig" doesn't.
All part of the fun of using shell, I suppose.
@FaheemMitha With "\\Sig" you also have the shell poking into the string, so you will additionally have to escape both backslashes. What you end up with is "\\\\Sig".
With "\\Sig", the shell will give \Sig to grep. \S is a literal S.
With '\\Sig', the shell will give \\Sig to grep. \\ is a literal backslash.
@Kusalananda That's what I figured, but I think the description of the history tag should be modified then
@Jesse_b Haven't looked at them.
the usage for /history says "The history of Unix systems and their main components. Please DO NOT USE this tag for shell-related questions; use "command-history" instead."
"shell-related questions" is too broad I think, although it does further clarify by saying:
"This tag is about the history of Unix systems and their main components. For the recall of previous commands in shells and other applications, use command-history"
12:26
@Jesse_b "Do not use for questions relating to the command-line history facility of an interactive shell"?
@Kusalananda Couldn't have said it better myself :-P
Yours is ok too.
Go ahead.
I was just quoting what is currently there lol
First part is the usage guidance and the second part is in the "further reading"
12:28
But yes, the "do not use for shell-related questions" needs changing.
I thought you showed the current text and then a suggested updating...
Going away for a little while again...
Tim
Tim
May I ask what curtlezumi's reply unix.stackexchange.com/a/458957/674 can do more than steve's unix.stackexchange.com/a/458677/674?
@Tim Use more lines of code :-P
It seems like essentially the same thing except it calculates the sleep time using more "human readable" input, although sleep itself on some systems can take human readable numbers like sleep 1h (I think)
it also contains a useless use of date which I didn't think was a thing
`date -d $(date -d "1 hours" '+%H:00:00') '+%s'`
is equal to:
`date -d '1 hours' +%s`
12:55
NVM about the UUOD I see what it's doing now
13:38
@Kusalananda What's a "literal S"?
@FaheemMitha An S.
\S is a literal S in the same sense that \\ is a literal \
"Literal" meaning "not standing in for anything else"
@Kusalananda So S is not a literal S, but \S is?
@FaheemMitha Quoting POSIX: "A <backslash> that is not quoted shall preserve the literal value of the following character"
@Kusalananda God, I so hate it when people quote POSIX.
Just kidding.
13:55
So, in essence, the backslash in \S preserves the literal value of the S in contexts that may otherwise interpret it as something else. I'm not away of any such context. More useful is \␣ (backslash-space), which causes the shell not to do word splitting on that space.
s/away/aware/
14:48
@Kusalananda I assume this literalism is a shell thing.
I mean, only a shell thing.
15:33
@FaheemMitha Well, in regular expressions too, depending on the flavour.
16:03
@Kusalananda Oh. So \Spreserves the literal value of the S in regular expressions too?
@FaheemMitha It would do, unless it's a PCRE regular expression, in which case it would mean "non-space".
16:32
@Kusalananda ok
17:02
Hi everybody
does anybody have an idea about this Unix related question? It s been open for a few days so far, but still unsolved...
3
Q: Linux C - Unable to properly unshare PID namespace

traduceradLong story short, I am trying to do operation system virtualization. To do so I unshared the mount namespace and PID namespace of a parent process and then forked. Yet when the child process tries to execute some command I can see there are many other PID's although I did unshare(CLONE_NEWPID) T...

 
2 hours later…
18:55
Hey guys,

I'm trying to apply the answer from https://unix.stackexchange.com/a/6438/32774 in my bash script (a script for transmission that runs after a file is completed)

But I just get this in my syslog: /home/xorinzor/transmission_torrent_finished.sh: line 14: [/home/xorinzor/Downloads/transmission/completed/KNOPPIX_V7.2.0CD-2013-06-16-DE: No such file or directory

The line looks like this:
if ["${FINISHED_DOWNLOAD##COMPLETED_PATH}" != "${FINISHED_DOWNLOAD}" ]; then

Where I want to make sure that the path from FINISHED_DOWNLOAD is a subdirectory of COMPLETED_PATH.
19:21
I just created a question for it instead unix.stackexchange.com/questions/459218/…
19:54
@xorinzor Sorry, I was out exercising a cat and didn't check the chat...
20:23
@Kusalananda no worries, my experience with the SO chatroom is that people aren't really in the chatroom that much anyway, so I figured I'd just give it a go, wait a bit, and if nothing happened to create a question instead ;)
 
2 hours later…

« first day (2850 days earlier)      last day (2402 days later) »