2,501 reputation
516
bio website
location
age
visits member for 2 years, 5 months
seen yesterday

1d
comment Using `case` to handle script arguments
Valid points all. I suppose I was concentrating more on the question of using case..esac to handle arguments at all. I too would be more inclined to use the functional route if I were authoring such a script.
1d
revised Using `case` to handle script arguments
fix recursion bug
1d
comment Using `case` to handle script arguments
Oh, of course. It should call -unmount and then -mount, not -remount. That fixes that problem.
2d
comment Programmatically get CPUs 'detailed' usage, like top/htop
You could poke around in /proc/, or use ps to see the raw information that top chews on, and parse it as you like.
2d
comment LAMP CentOS page/folder Outbound Inbound bandwidth monitor
Is your host or your firewall blocking that port?
2d
comment LAMP CentOS page/folder Outbound Inbound bandwidth monitor
It appears to only be listing on 127.0.0.1; if you're trying to get at it remotely, edit the ntop.conf file to have it listen on all interfaces, or a specific IP address.
2d
comment LAMP CentOS page/folder Outbound Inbound bandwidth monitor
ntop is a service that provides a web interface that allows you to analyse all the network traffic your computer sees or is a party to. See luca.ntop.org/download/ntop-users-guide/ntop_Users_Guide_2.3.pdf or www.ntop.org/ntop/mini-tutorial-fresh-install-of-ntopng-on-centos-7/
2d
reviewed Approve suggested edit on Writing a script that outputs local users and their password expiration date
2d
comment LAMP CentOS page/folder Outbound Inbound bandwidth monitor
You could look into installing ntop and watching where your outbound connections are using your bandwidth, or you can use netstat to see current connections. I'd also look at your process tree and the output of lsof to see what files are open; it's possible your system was compromised.
2d
comment Using `case` to handle script arguments
I'm pleased to be able to assist!
2d
comment Using `case` to handle script arguments
$0 is the zeroth paramater to a script or function; in this case, the invocation of the script itself. If I invoke a script with ./script foo bar; $0 is "./script", $1 is "foo", and $2 is "bar".
2d
reviewed Approve suggested edit on How can I change the default install path by using zypper in suse 11.2?
2d
comment Using `case` to handle script arguments
I have altered the answer to not have duplicated code, but rather to recurse.
2d
revised Using `case` to handle script arguments
rephrase to make more clear what is being asked; retitle question similarly
2d
answered Using `case` to handle script arguments
Nov
24
comment How to print only certain characters?
If you want to filter out the -s, then append to the end of your command ...| sed 's/-//g'. sed is a tool used to edit inline a stream of text, s/foo/bar/g means to replace all instances of foo with bar (in this case, nothing), and the final g means to do so globally.
Nov
24
comment Is there a difference between “a=b” & “a=$b”?
It was badly phrased; I have tweaked the answer to be more clear.
Nov
24
revised Is there a difference between “a=b” & “a=$b”?
more clear phrasing
Nov
22
answered Two virtual machine instance with same network on same host
Nov
21
comment Alternative to iotop for non-root user without sudo privileges
You could use a combination of top, specifically watching for 'wait' states, and vmstat.