Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

son avec le terminal

38 réponses
Avatar
Thomas
bonjour :-)


est ce qu'il existe des utilitaires unix capables d'émettre des sons ?
(pour l'instant, le son système par défaut quand il y a une erreur c'est
suffisant)

--
Téléassistance / Télémaintenance
http://www.portparallele.com/ThomasDECONTES/

8 réponses

1 2 3 4
Avatar
Thomas
In article ,
"Thierry B." wrote:

--{ JiPaul a plopé ceci: }--

>> chez moi ca donne respectivement a et 07 dans la sortie, et pas de
>> son.
>
> Ça doit dépendre du shell alors. Je suis en zsh.

$ printf "07"



merci, c'est ça que je cherchais :-)


chez moi,
echo $'a'
et
printf '07'
marchent

que fait le "$",
et c'est quoi la différence entre echo et printf ?

--
Téléassistance / Télémaintenance
http://www.portparallele.com/ThomasDECONTES/
Avatar
unbewusst.sein
Thomas wrote:

que fait le "$",



typo, amha ;-)
--
Une Bévue
Avatar
blanc
Thomas wrote:

merci, c'est ça que je cherchais :-)


chez moi,
echo $'a'
et
printf '07'
marchent

que fait le "$",



C'est bash qui demande de le mettre. Zsh s'en passe.
Cf le man de bash (et celui de zsh) :

-------------------
Words of the form $'string' are treated specially. The word
expands to
string, with backslash-escaped characters replaced as specifed
by the
ANSI C standard. Backslash escape sequences, if present, are
decoded
as follows:
a alert (bell)
b backspace
e an escape character
f form feed
n new line
r carriage return
t horizontal tab
v vertical tab
backslash
' single quote
nnn the eight-bit character whose value is the octal
value
nnn (one to three digits)
xHH the eight-bit character whose value is the
hexadecimal
value HH (one or two hex digits)
cx a control-x character
-------------------



et c'est quoi la différence entre echo et printf ?



D'après le même manuel :
echo [-neE] [arg ...]
Output the args, separated by spaces, followed by a
newline.
[...]
printf format [arguments]
Write the formatted arguments to the standard output
under the
control of the format.

Autrement dit echo affiche ses arguments séparés par des espaces et
suivis par un 'newline'
tandis que printf les affiche sous le controle d'un format (qui est le
premier argument) à la manière de printf en langage C.

Dans l'exemple l' argument unique est en fait le format !...



--
JiPaul.
/ /--/--// Jean-Paul Blanc
|/| L | quelquepart en (somewhere in)
/|| = ||| FRANCE
Avatar
Abou
On 29 août, 10:04, patpro ~ Patrick Proniewski
wrote:
In article <1imfgy5.c6ayhf1tq77dxN%,
  (Laurent Pertois) wrote:

> patpro ~ Patrick Proniewski wrote:

> > est-ce a dire qu'on n'a toujours rien en standard pour piloter la isi ght
> > via le terminal ?
> > c'est lourd :/

> Bah, ça doit exister vu les applis anti-vol qui tournent et font des
> photos de la personne devant la machine avec l'iSight.



Il y a aussi play (unix command) :
http://www.versiontracker.com/dyn/moreinfo/macosx/27808

Et QTplay (idem) :
http://mac.softpedia.com/get/Audio/qtplay.shtml
Avatar
Abou
> Il y a aussi play (unix command) :http://www.versiontracker.com/dyn/moreinfo/macosx/27808



play [-vrl] [-t time] [path]...
-v print status information to stdout
-r play audio files in random order
-l loop playback
-t time play each audio file for at most 'time' seconds
--help display this help message
--version display version information


Et QTplay (idem) :http://mac.softpedia.com/get/Audio/qtplay.shtml



Usage: qtplay [OPTION] [-cd] [<audiofile> | <directory> | -]...

play CDs, audio files, playlists, and directories containing audio
files (plays current directory contents by default).
if -cd, -f and <audiofile> options are present simultaneously, they
will be played in that order, regardless of the command-line ordering.

-c, -d, --cd, --CD play all CDs (backward compatible with -
cd)
-f <playlist> treat contents of file(s) as if on command
line
(ie. as playlist)

-v, --verbose verbose output
-q, --quiet quiet
-s, --speak DJ mode (ie. speak filename)
-r, --recursive evaluate directories recursively
-z, --shuffle shuffle play
-Z, --random random play. equivalent to shuffle + loop
-l, --loop loop
-1 one random file

-Q, --quicktime deprecated. switch included for backward
compat.
-S, --soundmanager deprecated. switch included for backward
compat.

-T, --killtime=<n> kill time (in seconds; default = double
click time)
-t, --updatetime=<n> deprecated. switch included for backward
compat.
-V, --volume=<n> volume (in percent; default = 100)

-n, --name=name last.fm username
-p, --password=password last.fm password

--savePrefs save settings to preference file and exit
--resetPrefs reset preferences to default values and
exit

-h, --help display this help and exit
--version print version information and exit

<audiofile>,<dir> audio files or directories

- read standard input

-- treat remaining arguments as file names
even
if they begin with a dash
Avatar
laurent.pertois
Abou wrote:

On 29 août, 10:04, patpro ~ Patrick Proniewski
wrote:
> In article <1imfgy5.c6ayhf1tq77dxN%,
> (Laurent Pertois) wrote:
>
> > patpro ~ Patrick Proniewski wrote:
>
> > > est-ce a dire qu'on n'a toujours rien en standard pour piloter la isight
> > > via le terminal ?
> > > c'est lourd :/
>
> > Bah, ça doit exister vu les applis anti-vol qui tournent et font des
> > photos de la personne devant la machine avec l'iSight.

Il y a aussi play (unix command) :
http://www.versiontracker.com/dyn/moreinfo/macosx/27808

Et QTplay (idem) :
http://mac.softpedia.com/get/Audio/qtplay.shtml



Euh, bien que j'apprécie ces commandes je ne vois pas le rapport avec
l'iSight :-)

--
Politically Correct Unix - UTILITIES
The "touch" command has been removed from the standard distribution due
to its inappropriate use by high-level managers.
Avatar
patpro ~ patrick proniewski
In article
,
Abou wrote:

On 29 août, 10:04, patpro ~ Patrick Proniewski
wrote:
> In article <1imfgy5.c6ayhf1tq77dxN%,
>   (Laurent Pertois) wrote:
>
> > patpro ~ Patrick Proniewski wrote:
>
> > > est-ce a dire qu'on n'a toujours rien en standard pour piloter la isight
> > > via le terminal ?
> > > c'est lourd :/
>
> > Bah, ça doit exister vu les applis anti-vol qui tournent et font des
> > photos de la personne devant la machine avec l'iSight.

Il y a aussi play (unix command) :
http://www.versiontracker.com/dyn/moreinfo/macosx/27808

Et QTplay (idem) :
http://mac.softpedia.com/get/Audio/qtplay.shtml



je doute que ces appli fassent des captures de photo via iSight...

patpro

--
A vendre : KVM IP 16 ports APC
http://patpro.net/blog/index.php/2008/01/12/133
Avatar
Abou
On 5 sep, 06:03, patpro ~ patrick proniewski
wrote:
In article
,





 Abou wrote:
> On 29 août, 10:04, patpro ~ Patrick Proniewski
> wrote:
> > In article <1imfgy5.c6ayhf1tq77dxN%,
> >   (Laurent Pertois) wrote:

> > > patpro ~ Patrick Proniewski wrote:

> > > > est-ce a dire qu'on n'a toujours rien en standard pour piloter la isight
> > > > via le terminal ?
> > > > c'est lourd :/

> > > Bah, ça doit exister vu les applis anti-vol qui tournent et font des
> > > photos de la personne devant la machine avec l'iSight.

> Il y a aussi play (unix command) :
>http://www.versiontracker.com/dyn/moreinfo/macosx/27808

> Et QTplay (idem) :
>http://mac.softpedia.com/get/Audio/qtplay.shtml

je doute que ces appli fassent des captures de photo via iSight...



Oops !
Je répondais aux messages sur les alertes sonores via le Terminal !
1 2 3 4