Search Results

Search: Posts Made By: Scrutinizer
79
Posted By Scrutinizer
The second query is from clients where both IPv4...
The second query is from clients where both IPv4 and IPv6 are enabled. If you do not want the second query on a client and you are only using IPv4, try disabling IPv6 on that particular client.
81
Posted By Scrutinizer
Hi, try: awk -F, 'NF>5' file It prints lines...
Hi, try:
awk -F, 'NF>5' file
It prints lines where the number of fields (NF) is more than 5, using a comma as a field separator (-F,)
143
Posted By Scrutinizer
That is because the find command produces a list...
That is because the find command produces a list of files, but wc -l turns it in just a count (number). Also the information is not being transferred to the mail command.

You could try something...
143
Posted By Scrutinizer
There are some issues with the script, mostly...
There are some issues with the script, mostly missing semicolons, newlines or space and a misplaced -print snippet. After a bit of cleanup:
cd /abc/test/source_test
if [ $(find . -maxdepth 1 -type...
190
Posted By Scrutinizer
Try this instead: s|(.*)/|$1/.|
Try this instead:
s|(.*)/|$1/.|
190
Posted By Scrutinizer
If you use this: s/^/\./ Then the . is added...
If you use this:
s/^/\./
Then the . is added at the beginning of the path.
To add it to the last item in the path, try:
s|.*/|$0/.|
190
Posted By Scrutinizer
Hi, in order for xargs to use NUL character...
Hi,

in order for xargs to use NUL character as separator, the utility before the pipe needs to produce them.

try:

mdfind -0 -onlyin . "Note" | xargs -0 -I {} echo {}
or
tag -0 -f "Note" ....
Forum: What is on Your Mind? 1 Day Ago
259
Posted By Scrutinizer
Congratulations Victor and Ravinder! Well and...
Congratulations Victor and Ravinder! Well and truly earned, both of you in different, valuable ways. Thank you for your contributions!
108
Posted By Scrutinizer
Hi, I noticed you use {7} in the script and {8}...
Hi, I noticed you use {7} in the script and {8} on the command line.
Other than that I cannot reproduce your error..
144
Posted By Scrutinizer
Hi, try sort -t_ -k1,3 -k4n
Hi, try
sort -t_ -k1,3 -k4n
148
Posted By Scrutinizer
Hi, .. refers to the parent directory ....
Hi,

.. refers to the parent directory
. refers to the current directory
124
Posted By Scrutinizer
Hi, there are some syntax errors in the sample...
Hi, there are some syntax errors in the sample code. Could you try this adaptation?
array=(1 2 3)
test=(Boy Girl Dog)
x=0
while [ $x -lt 3 ]
do
printf "%3s %-4s\n" "${array[x]}"...
174
Posted By Scrutinizer
Not sure what you are looking for. You could pipe...
Not sure what you are looking for. You could pipe the result into a while-read loop and use shell variables to compose your command.

jq -r '.name + ";" + .description'...
174
Posted By Scrutinizer
Try: jq -r '.description' -- It is best to...
Try: jq -r '.description'

--
It is best to put quotes around variable expansions:
echo "$vulnerabilities"

--
You do not need the intermediate step, you could also do this:
jq -r...
Forum: Programming 1 Week Ago
244
Posted By Scrutinizer
According to : Pandas' api reference...
According to : Pandas' api reference (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html)

pandas.read_csv returns
DataFrame or TextParser
A comma-separated values...
247
Posted By Scrutinizer
Slightly more "traditional" way of doing this: ...
Slightly more "traditional" way of doing this:

for (( i=0; i<${#L1[@]}; i++ ))
do
printf "%s %s\n" "${L1[i]}" "${L2[i%${#L2[@]}]}"
done

or
lenL1=${#L1[@]} lenL2=${#L2[@]}
for (( i=0;...
688
Posted By Scrutinizer
Pertaining to post #1: Try: join -12 -22 -o...
Pertaining to post #1: Try:
join -12 -22 -o 1.1,2.1 <(xargs -n1 <file1) <(xargs -n1 <file2)
520
Posted By Scrutinizer
Try converting the input file to UNIX format...
Try converting the input file to UNIX format first.
It appears to be in Windows format
tr -d '\r' <file >newfile


--
or you can maybe use
dos2unix file
if available on your OS.
Forum: Shell Programming and Scripting 3 Weeks Ago
466
Posted By Scrutinizer
Hi, try double quotes: sed...
Hi, try double quotes:
sed "s/${TOKEN1}\(.*\)${TOKEN2}.*/\1/" "$INPUT1"
The curly braces for variable expansions are good practice within strings, for reasons of readability and also to prevent...
520
Posted By Scrutinizer
You would need to compare $5 and $6 to all the...
You would need to compare $5 and $6 to all the ranges in $2, $3 so you would need to put them in memory first, so a way to do it would be to read the inputfile twice, the first time to put $2, $3 in...
538
Posted By Scrutinizer
Try: sed 's/[^ ]*_\(....\)\./\1 &/' file ...
Try:
sed 's/[^ ]*_\(....\)\./\1 &/' file
-rw-r--r-- 1 360 600 94255 Jan 01 11:16 2020 file1_2020.csv
-rw-r--r-- 1 360 600 114573 Dec 29 11:10 2019 file2_2019.csv...
Forum: Shell Programming and Scripting 3 Weeks Ago
567
Posted By Scrutinizer
POSIX regular expressions (BRE/ERE) and the GNU...
POSIX regular expressions (BRE/ERE) and the GNU and BSD derivatives are the exception, rather than the norm, in that \ is not special/meta within a character class (bracket) expression.

In (I...
Forum: Shell Programming and Scripting 3 Weeks Ago
810
Posted By Scrutinizer
One could also use quotes: ...
One could also use quotes:
AnzahlUeberstunden="$(date -d "$JAHR-$MONAT-$TAG $ArbeitEnde" +%s) - $(date -d "$JAHR-$MONAT-$TAG $NormalesArbeitsEnde" +%s)"
AnzahlUeberstunden='AnzahlUeberstunden / 60'
Forum: Shell Programming and Scripting 4 Weeks Ago
810
Posted By Scrutinizer
Because it is a an arithmetic operation (you are...
Because it is a an arithmetic operation (you are trying to divide a number by 60)

Therefore you need an arithmetic expansion ( see: Shell command language: arithmetic expansions...
Forum: Shell Programming and Scripting 4 Weeks Ago
810
Posted By Scrutinizer
Try the same as de line above with $(( ... )) en...
Try the same as de line above with $(( ... )) en some corrections in the variable name..
AnzahlUeberstunden=$((AnzahlUeberstunden/60))
or
(( AnzahlUeberstunden/=60 ))
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 11:17 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy