Δημοσιεύτηκε: 04 Ιαν 2014, 18:06
Ilias95 έγραψε:eliasps έγραψε:Για την ιστορία, υπάρχει και το ! operator για εξαίρεση.
Πως μπορεί να εφαρμοστεί για να εμφανίσει όλα τα αρχεία εκτός απ' το 1ο πχ;
Δηλαδή να «αντιστρέψει» την εντολή:
- Κώδικας: Επιλογή όλων
ls file*.ext | head -n 1
Δεν μπορώ να πετύχω την σύνταξη.
Δεν νομίζω ότι το θαυμαστικό στο Bash είναι Negation operator όπως το περιγράφει στο site.
Πχ δώστε
- Κώδικας: Επιλογή όλων
!800
αναλόγως το ιστορικό που κρατάτε βέβαια.
Επίσης στο manual το μόνο που είδα περί exclamation point είναι
έγραψε:
If the first character of parameter is an exclamation point (!), a level of variable indirection is introduced. Bash uses the value
of the variable formed from the rest of parameter as the name of the variable; this variable is then expanded and that value is used
in the rest of the substitution, rather than the value of parameter itself. This is known as indirect expansion. The exceptions to
this are the expansions of ${!prefix*} and ${!name[@]} described below. The exclamation point must immediately follow the left brace
in order to introduce indirection.
malos έγραψε:Μπορώ παιδιά από κονσόλα να στείλω κάποιο mail;
Μέσω κάποιου προγράμματος γι' αυτή τη δουλειά ; π.χ Sendmail