0

I am trying to segregate scan resoults by the last octet of the subnet mask however all i get is output to shell, it creates the files but there is nothing in them

#!/bin/bash
for j in $(seq 1 254);
do
    for i in $(seq 0 254)
    do 
        nc -n -v -z -w 1 1.0.$j.$i 8096 2>&1 >> 1_1_${j}_0_24
    done
done
3
  • You just need to redirect standard error to standard output after redirecting the latter to the file, not before. The answers to the duplicate should clear it up.
    – terdon
    Dec 25, 2022 at 19:39
  • It really did, Thanks. I just think it might be better for posterity to leave the question open as I normally get my results from google pronto but this time. Dec 25, 2022 at 20:26
  • Don't worry, this won't be deleted and will be Googleable and anyone who finds it will be taken to the duplicate.
    – terdon
    Dec 26, 2022 at 11:36

0

Browse other questions tagged .