Search Results

Search: Posts Made By: nezabudka
303
Posted By nezabudka
ss state established src 192.168.122.1 dst...
ss state established src 192.168.122.1 dst 192.168.122.84
Netid Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp ...
128
Posted By nezabudka
Hi You can use the -V option sort -V or...
Hi
You can use the -V option
sort -V
or even sort right away in a file
vim -nes +'%!sort -V' +wq file
114
Posted By nezabudka
Hi This way you won’t succeed too awk -F, '{...
Hi
This way you won’t succeed too
awk -F, '{ if(/$4 ~ "101"/)print; }' xx
185
Posted By nezabudka
It should work the same way on both the "bash"...
It should work the same way on both the "bash" and the "ksh93"
cat file
tom is hot
one two three
four five six
set -A store
#declare -A store
eval "store=($(awk '{for(i=1;i<=NF;i++) print "["...
185
Posted By nezabudka
Or so it’s easier and more understandable matrix...
Or so it’s easier and more understandable matrix creating
declare -A store
eval store=($(awk '{for(i=1;i<=NF;i++) print "[" NR "," i "]=" $i}' $filename))
126
Posted By nezabudka
Hi Try to insert spaces after "[" and before...
Hi
Try to insert spaces after "[" and before "]"
while [[ $a -ne 25 ]]; do
185
Posted By nezabudka
We can build a matrix! declare -A store store2 ...
We can build a matrix!
declare -A store store2
eval read store[$(awk 'END {print "{1.." NR "},{1.." NF "}"}' $filename)] < <(fmt -1000 $filename)
for i in {1..2},{1..3}; do echo store[$i] =...
185
Posted By nezabudka
associative array declare -A store eval read...
associative array
declare -A store
eval read store[{$(fmt -1 $filename | paste -sd,)}] < <(seq -s' ' $(wc -w <$filename))
echo ${store[@]}
echo ${!store[@]}

--- Post updated at 10:19 ---
...
185
Posted By nezabudka
Hi Maybe so store=($(<$filename))
Hi
Maybe so
store=($(<$filename))
303
Posted By nezabudka
Hi Maybe this will help? ss -t -o state...
Hi
Maybe this will help?
ss -t -o state established

--- Post updated at 16:07 ---

ss -t -o state connected
ss -t -o state synchronized
233
Posted By nezabudka
Yes, it's cool. "${L2[i%lenL2]]}" This...
Yes, it's cool.
"${L2[i%lenL2]]}"
This algorithm can be organized even on "awk" or "bc" with a large size of values
Thanks @Scrutinizer
233
Posted By nezabudka
Yes, it’s very convenient to insert any separator...
Yes, it’s very convenient to insert any separator character or even string,
and if I put in quotation marks then any whitespace characters without "paste"
for i in ${!L1[@]}; do echo...
233
Posted By nezabudka
Combining lists
Hello everybody.
My operating system is Fedora30, shell - bash
I faced combining lists. I will be glad for help regarding strings, arrays and so on.
The bottom line is as follows. It is necessary...
164
Posted By nezabudka
Hi I understand that the question is purely...
Hi
I understand that the question is purely academic.
But if we consider the practical application, then this command is completely redundant.
grep -r 'text' --include=*.txt .
I wanted you to...
237
Posted By nezabudka
Hi As I understand it a linux "pstree" My...
Hi
As I understand it a linux "pstree"
My five cents.
It comes with a built-in pager
systemd-cgls
Another option
ps xawf -eo pid,user,cgroup,args
655
Posted By nezabudka
My advice. Just make sure that one line is...
My advice. Just make sure that one line is executed without any cycles.
Then the working sample will be conveniently substitute in script
db2 -x "select DOCID from ICMADMIN.NNSPDM_PRI_01001 where...
655
Posted By nezabudka
join -12 -22 -o 1.1,2.1 et.tst itid.tst | while...
join -12 -22 -o 1.1,2.1 et.tst itid.tst |
while read a b; do
db2 -x "select DOCID from ICMADMIN.$a where ITEMID='$b'"
done
Reread I fixed the code
655
Posted By nezabudka
Well, I can absolutely accurately reproduce ...
Well, I can absolutely accurately reproduce
eval echo -ne "db2' '-x' \"'select' 'DOCID' 'from' 'ICMADMIN.{$(paste -sd, et.tst)}' where ITEMID='\'{$(paste -sd, itid.tst)}\''\"\n'"
db2 -x "select...
655
Posted By nezabudka
eval echo -ne "db2' '-x' \"'select' 'DOCID'...
eval echo -ne "db2' '-x' \"'select' 'DOCID' 'from' \"'ICMADMIN.{$(paste -sd, ITEMID.txt)}'\" where ITEMID=\"'{$(paste -sd, et.txt)}'\n'" | bash

--- Post updated at 14:07 ---

Another variant...
655
Posted By nezabudka
The thing is that the files do not consist of a...
The thing is that the files do not consist of a list as stated, but of the lines!

--- Post updated at 13:37 ---

it is very easy to solve
eval echo -ne "echo' '-x' \"'select' 'DOCID' 'from'...
655
Posted By nezabudka
Ok Try it like this, which will output? eval...
Ok
Try it like this, which will output?
eval echo -en "echo' '-x' \"'select' 'DOCID' 'from' \"'ICMADMIN.{$(tr ' ' , <ITEMID.txt)}'\" where ITEMID=\"'{$(tr ' ' , <et.txt)}'\n'"

--- Post updated...
655
Posted By nezabudka
Immediately apologize for this disgrace, but it...
Immediately apologize for this disgrace, but it should work
eval echo -en "db2' '-x' \"'select' 'DOCID' 'from' \"'ICMADMIN.{$(tr ' ' , <file1)}'\" where ITEMID=\"'{$(tr ' ' , <file2)}'\n'" | bash
655
Posted By nezabudka
And I managed to throw out an extra command ...
And I managed to throw out an extra command
eval echo -en "{$(tr ' ' , <file1)}' '{$(tr ' ' , <file2)}'\n'" |
while read a b; do
echo "$a $b"
done

--- Post updated at 20:12 ---...
655
Posted By nezabudka
Hi eval echo {$(tr ' ' , <ITEMID.txt)}{$(tr ' '...
Hi
eval echo {$(tr ' ' , <ITEMID.txt)}{$(tr ' ' , <elementen.txt)} | fmt -1

--- Post updated at 17:50 ---

It’s quite possible
eval echo {0..10}{$(tr ' ' , <file2)} | fmt -1
or even such...
417
Posted By nezabudka
Ok Then this is what the doctor ordered. The...
Ok
Then this is what the doctor ordered. The command from the post #3 will filter duplicate values for 2 field.
If you need to select by the unique value of the entire line then so
awk '!T[$0]++'...
Showing results 1 to 25 of 354

 

Featured Tech Videos

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