Search Results

Search: Posts Made By: Scrutinizer
62
Posted By Scrutinizer
umask 007 folder1 umask 007 backupfolder ...
umask 007 folder1
umask 007 backupfolder
umask 007 folder2
umask 007 webapps

Are not valid commands, the last field will be ignored. It is equivalent to:
umask 007
umask 007
umask 007
umask...
189
Posted By Scrutinizer
Try: awk ' NR==FNR { ...
Try:

awk '
NR==FNR { # When reading the first file (then NR is equal to FNR)
A[$1]=$0 # Store the first file...
161
Posted By Scrutinizer
Also try: awk -F= '/^>/{if(getline<f>0) $0=">"...
Also try:
awk -F= '/^>/{if(getline<f>0) $0=">" $2}1' f=list.txt gene1.fasta

or without the check:
awk -F= '/^>/{getline<f; $0=">" $2}1' f=list.txt gene1.fasta
197
Posted By Scrutinizer
Try this modification to your code: ...
Try this modification to your code:
INACTIVE_KERNELS=$(python -mplatform | grep -qvi red && echo "Not Red Hat Server" || rpm -qa | grep '^kernel-[0-9]' |grep -vE `uname -r` | paste -sd \; | grep ....
197
Posted By Scrutinizer
Appending this would test if the returned string...
Appending this would test if the returned string is empty, so you could try that:
| grep .


--
The return code of the earlier grep command is nixed by the successful paste command
255
Posted By Scrutinizer
That is the case with sed, but with awk it can be...
That is the case with sed, but with awk it can be on the same line.

$ printf '1 2\n2 3\n3 4\n' | sed -n '/1/,/2/p'
1 2
2 3

$ printf '1 2\n2 3\n3 4\n' | awk '/1/,/2/'
1 2
255
Posted By Scrutinizer
I suggest using a range expression, so that all...
I suggest using a range expression, so that all replacements occur over all lines. Try:
awk '/Umbist_reverse_inst/,/\);/{gsub(/\(\)/,"")}1' list
Also, the parentheses need to be escaped, since they...
Forum: Web Development 5 Days Ago
186
Posted By Scrutinizer
This is huge, congrats, great effort guys...
This is huge, congrats, great effort guys...
143
Posted By Scrutinizer
Hi, you do not need the echo $a1 | part. ...
Hi, you do not need the echo $a1 | part.

Try:
ssh -q -i ~/.ssh/mysshkey remoteserver "sed -i '\%$a1%d' mylog.txt"

There was a backslash before the last single quote.
292
Posted By Scrutinizer
To adjust vgersh99's suggestion try: awk...
To adjust vgersh99's suggestion try:
awk '{i=tolower($1)} FNR==NR {f1[i]=$0;next} i in f1 {print $0, f1[i]}' all-Vms-1.txt all-vm-unix.txt
292
Posted By Scrutinizer
Use the tolower(str) function to changes strings...
Use the tolower(str) function to changes strings to lowercase where appropriate to make it case insensitive...
311
Posted By Scrutinizer
This will only check if one of the conditions is...
This will only check if one of the conditions is true, but not which one is true. If you want to find out, which of the expression is true, you will need to check them one by one..

Which means...
318
Posted By Scrutinizer
Hi, try: #!/bin/bash ...
Hi, try:
#!/bin/bash

vFileDir="sample_list.txt"

printf " \n"
#read the content of the file by line
while read vStr1 vStr2
do
echo "vStr1: $vStr1"
echo "vStr2: $vStr2"

...
311
Posted By Scrutinizer
The correct syntax would be something something...
The correct syntax would be something something like this, using arithmetic evaluation:
if (( dm > 0 || cl == 100 || ad == 0 || me > 8 || cp > 0 )); then

or if you want to use the test utility,...
452
Posted By Scrutinizer
Hi, try: join -t \| -a 1 -a 2 -e 'NULL' -o 0...
Hi, try:
join -t \| -a 1 -a 2 -e 'NULL' -o 0 1.2 1.3 1.4 2.2 2.3 2.4 \
<(join -t \| -a 1 -a 2 -e 'NULL' -o 0 1.2 2.2 2.3 file1 file2) file3
Forum: Solaris 2 Weeks Ago
479
Posted By Scrutinizer
I certainly agree about removing inherently...
I certainly agree about removing inherently insecure daemons/utilities altogether, preferably through configuration management tooling if there are many servers (I use ansible for Solaris) so that it...
Forum: Solaris 2 Weeks Ago
479
Posted By Scrutinizer
You need to restart or reload the inetd/xinetd...
You need to restart or reload the inetd/xinetd process so that it reads the new inetd.conf or inetd.d files.. You can also give a kill -HUP to the inetd/xinetd process.
Forum: What is on Your Mind? 2 Weeks Ago
544
Posted By Scrutinizer
Welcome to the team, Dave.. Glad to have you...
Welcome to the team, Dave.. Glad to have you onboard!
415
Posted By Scrutinizer
I corrected and formatted your code to give you...
I corrected and formatted your code to give you an idea how it could be formatted:
BEGIN {
FS=","
}

{
if ($1 == "ADD") {
for (a=2; a <= NF; a++)
b += $a
}
else if ($1 ==...
100
Posted By Scrutinizer
Hi, On Solaris 9 this probably should work...
Hi,

On Solaris 9 this probably should work too (depending on the shell which you did not specify), try:
alias dutop10='\du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2...
460
Posted By Scrutinizer
In bash you can check whether a variable starts...
In bash you can check whether a variable starts with a number like so:
if [[ $somevar == [0-9]* ]]; then
You can check if it begins with a letter like this:
if [[ $somevar == [[:alpha:]]* ]]; then
Forum: Shell Programming and Scripting 2 Weeks Ago
581
Posted By Scrutinizer
Yes, just put > before the back reference \1: ...
Yes, just put > before the back reference \1:
sed '/^>/s/.*OS=\(.*\) OX=.*/>\1/' file
Forum: Shell Programming and Scripting 2 Weeks Ago
581
Posted By Scrutinizer
Hi, if the labels are always in that particular...
Hi, if the labels are always in that particular order, try:
sed '/^>/s/.*OS=\(.*\) OX=.*/\1/' file
Or if labels always only have uppercase names, followed by = signs, you could try:
sed...
431
Posted By Scrutinizer
If you append | paste -sd \; to the command then...
If you append | paste -sd \; to the command then you get them in semi-colon separated fields in one line..
Forum: OS X (Apple) 3 Weeks Ago
778
Posted By Scrutinizer
MacOS 10.15 (Catalina) switches from bash to zsh
Interestingly Apple has decided to switch the default shell for new users from bash to zsh in MacOS Catalina (10.15)
Use zsh as the default shell on your Mac - Apple Support...
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy