Reputation
3,072
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
5 20
Newest
 Yearling
Impact
~195k people reached

May
4
revised How can I keep my SSH sessions from freezing?
Adding details about the NULL packet
May
4
comment Remove lines in a shell script
@StéphaneChazelas Thanks for the suggestion. The answer has been modified, feel free to provide a more portable solution.
May
4
revised Remove lines in a shell script
Update suggestion stephane
May
4
revised Remove lines in a shell script
added 211 characters in body
May
4
comment Remove lines in a shell script
Before providing answers let's wait and see what sie already tried. Nobody is expecting to spoon feed anybody.
May
4
answered How can I keep my SSH sessions from freezing?
Apr
30
reviewed Approve How do I update packages on Red Hat Linux?
Apr
30
comment IP address of the username who uses sftp connection in unix
using w -f should show you what protocol is being used and what is being accessed.
Apr
29
comment How to use md5sum for checksum with an md5 file which doesn't contain the filename
cmp test.txt.md5 <(md5sum test.txt | awk '{print $1}') && echo $? If the result returned is 0 then there is a match
Apr
29
comment kill: SIGSTOP: invalid signal specification error in bash script
Well ok, I didn't notice the -SIGSTOP I thought passing -s to kill was mandatory. Thanks for the explaination! Learnt something new today.
Apr
29
comment kill: SIGSTOP: invalid signal specification error in bash script
As I explained in my edited answer. set +o posix will allow the usage of SIGTERM, SIGSTOP etc. I do agree that set -o posix at the end is not necessary. It's more a habit. I'm not sure what the significance or the added value is in your answer.
Apr
29
comment kill: SIGSTOP: invalid signal specification error in bash script
Well according to posix specs, there is no SIG in sh. So again instead of commenting on every answer I post you better edit the answer and provide the right one. How's that?
Apr
29
revised kill: SIGSTOP: invalid signal specification error in bash script
added 251 characters in body
Apr
29
comment kill: SIGSTOP: invalid signal specification error in bash script
@user4757345 if that solved your problem, just modify the answer and add the explanation.
Apr
29
comment kill: SIGSTOP: invalid signal specification error in bash script
I see. Well probably because you need to enable posix mode? Are you on a Mac? set +o posix; kill -SIGSTOP 1234 could solve the problem as well!
Apr
29
comment kill: SIGSTOP: invalid signal specification error in bash script
Does the answer I posted illustrate the scenario? Do you still get the error? It should work interactively and as well as within a script.
Apr
29
answered kill: SIGSTOP: invalid signal specification error in bash script
Apr
29
comment kill: SIGSTOP: invalid signal specification error in bash script
You can use e.g trap 'kill -s SIGSTOP 1234' EXIT in a bash script. Also it is #!/bin/bash
Apr
29
comment Command to print users that don't have /sbin/nologin as a shell
@RomeoNinov Again, parsing ls output is not recommended. ls -l will also show the total bytes as the first field. Then the OP asks about files only and not folders,subfolders or files found in subfolders. Why you shouldn't parse ls output is explained here: mywiki.wooledge.org/ParsingLs
Apr
28
comment Command to print users that don't have /sbin/nologin as a shell
@RomeoNinov find might be an overkill but it is very accurate in checking directories. Parsing ls output is in general not Recommended.