[..]
This is not ouright wrong, just dangerous. Suppose the variable groups has no content: this would leave the following command to be executed:
similar, if groups contains a space char:
and this, subsequently, will lead to a syntax error. If you query variables and their contents do it this way (notice the quoting):
Hi Bakunin, this is not right. Again, this is mixing up shell keywords ( which [[ ... ]] are) and a shell utility (which is the case with [ ... ]) . There really is no reason to use double quotes here, unless you want to combine whitespace separated fields (which is not the same as field splitting) or prevent pattern matching together with the == operator or regex matching together with the =~ operator (if available).
From man bash
Quote:
Word splitting and pathname expansion are not performed on the words between the [[ and ]]
and man ksh (both 88 and 93):
Quote:
Field splitting and file name generation are not performed on the words between [[ and ]]
Quote:
or, even more preferably, because being POSIX-compliant:
This syntax is incorrect and not part of POSIX. Correct POSIX syntax would be:
Last edited by Scrutinizer; 10-10-2016 at 09:22 PM..
Hi All,
I am trying to find the physical memory usage by each process/users.
Can you please let me know how to get the memory usage?.
Thanks,
bsraj. (12 Replies)
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Hi i just wanted to know what is the code to display amount of RAM and also the percentage used? I know i can possibly use the vmstat code but what part indicates the RAM? Any help would be much appreciated. Thanks (1 Reply)
Hi
one of our applications that runs on our Linux server leaks memory resulting in Ram that was used by the program not being released back to the operating system once a file has been processed. the result is over a very short period virtual all the memory has been used. an example currently
... (8 Replies)
Hi RAM of my system is 24 GB however when i checked the processes pids and counted the memory usage by pmap i found out that the total memory usage is 36 GB
It s obvious that my system might be using some of virtual memory or swap space . How can i check which memory it is using and how ..
... (9 Replies)
Hi team
I have three physical servers running on Red Hat Enterprise Linux Server release 6.2 with the following memory conditions:
# cat /proc/meminfo | grep -i mem
MemTotal: 8062888 kB
MemFree: 184540 kB
Shmem: 516 kB
and the following swap conditions:
... (6 Replies)
Hey there! I'm a new user here who registered because I couldn't get these kind of questions answered in the place I directly com from. :o
I've found a discrepancy in total RAM used and I can't figure out why it is. My only guess is there are some RAM used by some stuff impossible to identify,... (2 Replies)
Hi,
I will be creating a process myself and I want to know the average CPU and RAM used by the process over the lifetime of the process. I see that there are various tools available(pidstat) for doing , I was wondering if it possible to do it in a single command while creation.
Thanks in... (3 Replies)
Hello,
I have an ubuntu14.04 installed pc with 32GB ram.
Operating System: Ubuntu 14.04.5 LTS
Kernel: Linux 4.9.148-xxxx-std-ipv6-64
Architecture: x86_64
When I check free memory it shows:
total used free shared buffers cached
Mem: 31882 ... (2 Replies)