Aples erotisoules

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Apr 3 02:33:01 EEST 2003


On 2003-04-02 14:21, Nicolas Greece <nicolas26 at yahoo.com> wrote:
>
> Se proigoumeno email mou sxetika me tou mounting elava tin apadisi
> oti boro na kano unmount.  Malista unmount /dev/cdrom. Entoli omos
> tetoia den eiparxei (unmount). Apo oti katalava me ton automounter
> pou exo h siskevi einai sto /mnt/cdrom kai boreis na vgaleis to cd
> apo to cdrom mono an metakinitheis se allo arxeio.  Diorthoste me an
> kano lathos..

An koitakseis kala stin apanthsh tha deis oti h entolh den legetai
'unmount'.  Ksanadiabase thn apanthsh sto:

http://lists.hellug.gr/pipermail/linux-greek-users/2003-April/106126.html

> http://mcrypt.hellug.gr
> Distixos ekei to programmataki arneitai na katevei.  Otan pao na
> kano download kollane ola!!!  An to exei kapios, as to steilei

Apo to http://mcrypt.hellug.gr/ akolouthise to link
"Here you can get mcrypt".

Tha se metaferei sth selida http://mcrypt.hellug.gr/mcrypt/index.html

Apo ekei to "Download Source" se paei sto
ftp://mcrypt.hellug.gr/pub/crypto/mcrypt

klp.  Mia xara paizei h selida...

Poio htan to "programmataki" pou se kollhse?

> a)
> echo 'Nikos Kostas Manolis' > mailList
> chmod a+x mailList
>
> Sto vivlio perivalon programmatismou Unix, leei oti
> boro tora na to kano:
> sh mailList
> kai na do ta periexomena. Pragma pou den mou ginete!!!

Oxi.  An thes na kaneis kati tetoio kane kalutera to ejhs:

	$ echo "echo 'Nikos Kostas Manolis'" > koko
	$ sh koko

kai koita ta periexomena tou arxeiou `koko'.

> Episis an to mv mailList /bin tha boro na dino apeftias mailList
> xoris sh

Alitheia einai.  An ena programma pou legetai "lala" mporei na treksei
apo ton trexonta katalogo dinontas

	./lala

tote kanontas to copy h move se ena katalogo opws to /bin pou einai
sto PATH sou tha mporeis na to trekseis xoris na thymasai apekso to
full path.  Auth einai kai h diafora pou exei p.x. to parakato:

	$ ls

apo to na doseis to plhres path:

	$ /bin/ls

> Pios einai alitheia o tropos gia na kano ena arxeio na trexei me
> afto to tropo?

Prota apo ola prepei na einai ektelesimo.  Gi auto xreiazetai kai to
`chmod u+x' parapano.  Ustera prepei eite na to kaneis copy se kapoio
katalogo pou einai sto PATH sou, eite na to trexeis me full path.

Gia to ti einai to PATH kai pos paizei, sunexise na diabazeis to polu
kalo biblio sou :)

> Sto idio vivlio vlepo tin entoli 'pick' alla den eiparxei sto
> sistima mou???

H pick einai mia entolh pou siga siga tin anaptussei o suggrafeas kata
th diarkeia tou bibliou.  Xoris na biazesai na ta matheis ola, mporeis
na koitakseis sto kefalaio 6.5 gia na deis ena paradeigma ulopoihshs
ths.  An den katalabeis pos douleuei me thn proth min agxonesai.  Siga
siga tha bgaleis akrh.

> Thelo na kano mail kai anti na doso ola ta onomata, na eisago ti
> mailList kai apo ekei na epilekso se pious thelo na paei me y kai n...

Enas entelos athlios tropos na ylopoihseis mia `pick' entolh se shell
script tha mporouse na einai ki o ejhs:

	#!/bin/sh

	select () {
		if  [ X"$1" = X"" ]; then
			return
		fi

		echo -n "$1 ? (y/n)" >/dev/tty
		read reply _junk </dev/tty
		unset _junk
		case ${reply} in
		[yY]|[yY][eE][sS])
			echo "$1"
			;;
		*)
			;;
		esac
	}


	if [ $# -eq 0 ]; then
		while read name ;do
			select "${name}"
		done
	else
		for name in "$@" ;do
			select "${name}"
		done
	fi

Mporeis na to trekseis gia dokimh me duo arxeia list-input kai
list-output os ejhs:

	$ cat list-input
	giorgos
	nikos
	kostas
	panos

	$ sh pick < list-input > list-output
	giorgos ? (y/n) y
	nikos ? (y/n) y
	kostas ? (y/n) n
	panos ? (y/n) n

	$ cat list-output
	giorgos
	nikos

To idio to script einai ligo `proxorhmeno' ki exei kapoia `bugs' pou
to kanoun mh-idaniko gia sobarh xrhsh, alla elpizo pos tha to
diabaseis kai tha rothseis oti den katalabaineis h sou fainetai
periergo.

- Giorgos




More information about the Linux-greek-users mailing list