Fórum Ubuntu CZ/SK
Ubuntu pro osobní počítače => Obecná podpora => Téma založeno: garmada 05 Září 2008, 12:48:59
-
Ako sa da nastavit ked spustim terminal aby sa my spustil niaky pripraveny prikaz, napr. aby my vypisalo "Ahoj, garmada.".
Popripade ako sa da spravit aby som tam mal viacej moznosti a aby sa
nachodne menili.
-
Podivej se do ~/.bashrc
Najdete napriklad nasledujici cast a pridejte tam to echo:
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
echo "AHOJ"
;;
*)
;;
esac
S tim nahodnym menenim by to bylo slozitejsi. Podivej se na nejaky serial o programovani v bashi napriklad na www.abclinuxu.cz nebo www.root.cz a pak urcite prijdes na nejakou moznost.
-
Vedel by niekto pomoct s tym nachodnym spustanim?
-
tam, co ti poradil truhlik
cat ~/kecy.txt | sort -R | tail -1
http://blog.starenka.net/music/2008-05-31-je-libo-nahodne-moudro-pri-startu-konzole
-
Ten argument -R nejde.
-
1. nejde neni odpoved, se kterou ti nekdo poradi. konkretizuj
2. sort -R funguje, pokud mi neveris, odkazu te opet na manualove stranky
3. tady mas dukaz
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
A mathematician is a device for turning coffee into theorems.
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
You don't have to explain something you never said.
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
If 50 million people say a foolish thing, it's still a foolish thing.
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
Love may be blind but marriage is a real eye-opener.
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
It's the squeaky wheel that gets the grease.
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
Today is the first day of the rest of this mess.
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
I have a strong will but a weak won't.
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
Children in the dark make accidents, but accidents in the dark make children.
starenka@miniwanka:~$ cat ~/.purple/plugins/randomator.txt | sort -R | tail -1
If ignorance is bliss, why aren't more people happy?
4. rekl bych, ze tim nefunguje bud mas na mysli, ze si katujes neexistujici soubor, nebo soubor s jednou radkou, ze kteryho logicky nahodne vybere prave tu jednu
-
Pise my:
hax@hax-laptop:~$ cat /home/hax/murph.txt | sort -R | tail -1
sort: invalid option -- R
Try `sort --help' for more information.
hax@hax-laptop:~$
-
Musim se garmada zastat, ale u me je to podobne.
truhlik@ubuntu-laptop:~$ cat prednaska.txt | sort -R
sort: invalid option -- R
Try `sort --help' for more information.
A man sort nic o parametru -R neni. Moje verze sortu je:
truhlik@ubuntu-laptop:~$ sort --version
sort (GNU coreutils) 5.97
-
pokud mame oba (k)ubuntu, pak nechapu, proc by tvuj sort mel bejt jinej nez muj. koukni do manualu, ja k tomu mam jeste alias --random-sort.
starenka@miniwanka:~$ sort --version
sort (GNU coreutils) 6.10
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and Paul Eggert.
ps. toho samyho efektu (nahodnyho kecu) dosahnes i jinou kombinaci prikazu nebo pomoci balicku "fortune", jak si tam dohazet hlasky, jiste snadno vyhledas v manu.
pps. sory, chyba zrejme neni na tvy strane a jsem na tebe vyletel ;)