Μπορείς να κάνεις redirect την έξοδο σε κάποιο αρχείο, το οποίο μπορείς και να περνάς στο script ως όρισμα. Απλά χρειάζεται μια μικρή αλλαγή όλο κι όλο.
#!/usr/bin/env sh for apotelesma in `seq 1 5` do echo $(date | sha512sum | head -c 20) > $1 sleep 1 done Τώρα αν για παράδειγμα το script λέγεται myscript μπορείς να το καλέσεις ώς εξής: ./myscript password_file.txt και νά πάρεις στο password_file.txt τους κωδικούς On Sun, Mar 6, 2022 at 3:23 PM Αντώνης Αντωνούλας <aanto...@otenet.gr> wrote: > Έχω ένα shell script για την παραγωγή ισχυρών κωδικών. Ο κώδικάς του > είναι διαμορφωμένος ως εξής: > > #!/usr/bin/env sh > for apotelesma in `seq 1 5` > do > date | sha512sum | head -c 20 > echo "" > sleep 1 > done > > Υπάρχει τρόπος να διαμορφωθεί έτσι ώστε οι παραγόμενοι κωδικοί να > εμφανίζονται σε ένα αρχείο text μόλις εκτελεστεί το script; Ακόμη > υπάρχει τρόπος ώστε οι δημιουργούμενοι κωδικοί να εμπεριέχουν και > ελληνικούς, εκτός από λατινικούς χαρακτήρες; > > Σας ευχαριστώ όλους για την οποιαδήποτε απάντηση! > > > -- > Ubuntu-gr mailing list > Ubuntu-gr@lists.ubuntu.com > > If you do not want to receive any more messages from the ubuntu-gr mailing > list, please follow this link and choose unsubscribe: > https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.ubuntu.com/archives/ubuntu-gr/attachments/20220306/427a2ba1/attachment.html> -- Ubuntu-gr mailing list Ubuntu-gr@lists.ubuntu.com If you do not want to receive any more messages from the ubuntu-gr mailing list, please follow this link and choose unsubscribe: https://lists.ubuntu.com/mailman/listinfo/ubuntu-gr