Trying to redirect and prefix sudo to the next inline command? [on hold]
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Okay I think I found the answer. The $ isnt used for strings but for input parameter variables like argv[0..X] in c. There is a bug with bash $(0)
as opposed to bash $0
when this is evaluated $(exansion) if that evaluates to $(0) it calls the bash command and send text as $1
Additionally, The Terminal Emulator disables bell I need to set the apropriate variables as discussed on http://docs.xfce.org/apps/terminal/start
I am trying to learn this I was told I need to be in audio permissions group and dsp is not supported in kernel. I am trying to prefix the pipe with the sudo
command
cd /dev/snd && ls pcm* | shuf -n 1 &| (sudo &1 /dev/dsp)
What should &1
be set to $1
or $2
? perhaps a form of sudo !! So that I can prefix sending the audio to dev/dsp
Or would I change to
cd /dev/snd && ls pcm* | shuf -n 1 &| sudo cat (data that Im Piping) /dev/dsp)
Let me clarify how do I reference the actual data in the &|
command do I need the sed -e 's_^_man _'
or is there another way to do this?
I am trying to use the old PC speaker not the sound card or alsa.
I may have similar issues to Why won't Linux let me play with /dev/dsp? I need to resolve to like I never learned how to give audio group permissions etc
linux dsp
New contributor
put on hold as unclear what you're asking by dr01, JigglyNaga, Anthony Geoghegan, Thomas, schily 2 days ago
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
0
down vote
favorite
Okay I think I found the answer. The $ isnt used for strings but for input parameter variables like argv[0..X] in c. There is a bug with bash $(0)
as opposed to bash $0
when this is evaluated $(exansion) if that evaluates to $(0) it calls the bash command and send text as $1
Additionally, The Terminal Emulator disables bell I need to set the apropriate variables as discussed on http://docs.xfce.org/apps/terminal/start
I am trying to learn this I was told I need to be in audio permissions group and dsp is not supported in kernel. I am trying to prefix the pipe with the sudo
command
cd /dev/snd && ls pcm* | shuf -n 1 &| (sudo &1 /dev/dsp)
What should &1
be set to $1
or $2
? perhaps a form of sudo !! So that I can prefix sending the audio to dev/dsp
Or would I change to
cd /dev/snd && ls pcm* | shuf -n 1 &| sudo cat (data that Im Piping) /dev/dsp)
Let me clarify how do I reference the actual data in the &|
command do I need the sed -e 's_^_man _'
or is there another way to do this?
I am trying to use the old PC speaker not the sound card or alsa.
I may have similar issues to Why won't Linux let me play with /dev/dsp? I need to resolve to like I never learned how to give audio group permissions etc
linux dsp
New contributor
put on hold as unclear what you're asking by dr01, JigglyNaga, Anthony Geoghegan, Thomas, schily 2 days ago
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
2
The pipeline that you include has a couple of unusual tokens:&|
and&1
. Can you explain what these are supposed to do? Also, could you describe what the pipeline is aiming at doing as a whole? At the moment, it seems as if your are trying to pick a random file matchingpcm*
under/dev/snd
and do... something with it? How is yoursed
command connected with this?
â Kusalananda
2 days ago
Its frustrating how when I type something the actual text is altered I think is a php parse thing.
â openInvent
7 hours ago
see man bash | grep "|" this line If |& is used, for 2>&1 |. This implicit redirection of the standard error to the operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or Of these list operators, && and || have equal precedence, followed by ; the && and || control operators, respectively. AND and OR lists are command1 || command2
â openInvent
7 hours ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Okay I think I found the answer. The $ isnt used for strings but for input parameter variables like argv[0..X] in c. There is a bug with bash $(0)
as opposed to bash $0
when this is evaluated $(exansion) if that evaluates to $(0) it calls the bash command and send text as $1
Additionally, The Terminal Emulator disables bell I need to set the apropriate variables as discussed on http://docs.xfce.org/apps/terminal/start
I am trying to learn this I was told I need to be in audio permissions group and dsp is not supported in kernel. I am trying to prefix the pipe with the sudo
command
cd /dev/snd && ls pcm* | shuf -n 1 &| (sudo &1 /dev/dsp)
What should &1
be set to $1
or $2
? perhaps a form of sudo !! So that I can prefix sending the audio to dev/dsp
Or would I change to
cd /dev/snd && ls pcm* | shuf -n 1 &| sudo cat (data that Im Piping) /dev/dsp)
Let me clarify how do I reference the actual data in the &|
command do I need the sed -e 's_^_man _'
or is there another way to do this?
I am trying to use the old PC speaker not the sound card or alsa.
I may have similar issues to Why won't Linux let me play with /dev/dsp? I need to resolve to like I never learned how to give audio group permissions etc
linux dsp
New contributor
Okay I think I found the answer. The $ isnt used for strings but for input parameter variables like argv[0..X] in c. There is a bug with bash $(0)
as opposed to bash $0
when this is evaluated $(exansion) if that evaluates to $(0) it calls the bash command and send text as $1
Additionally, The Terminal Emulator disables bell I need to set the apropriate variables as discussed on http://docs.xfce.org/apps/terminal/start
I am trying to learn this I was told I need to be in audio permissions group and dsp is not supported in kernel. I am trying to prefix the pipe with the sudo
command
cd /dev/snd && ls pcm* | shuf -n 1 &| (sudo &1 /dev/dsp)
What should &1
be set to $1
or $2
? perhaps a form of sudo !! So that I can prefix sending the audio to dev/dsp
Or would I change to
cd /dev/snd && ls pcm* | shuf -n 1 &| sudo cat (data that Im Piping) /dev/dsp)
Let me clarify how do I reference the actual data in the &|
command do I need the sed -e 's_^_man _'
or is there another way to do this?
I am trying to use the old PC speaker not the sound card or alsa.
I may have similar issues to Why won't Linux let me play with /dev/dsp? I need to resolve to like I never learned how to give audio group permissions etc
linux dsp
linux dsp
New contributor
New contributor
edited 7 hours ago
New contributor
asked Oct 25 at 9:39
openInvent
113
113
New contributor
New contributor
put on hold as unclear what you're asking by dr01, JigglyNaga, Anthony Geoghegan, Thomas, schily 2 days ago
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as unclear what you're asking by dr01, JigglyNaga, Anthony Geoghegan, Thomas, schily 2 days ago
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
2
The pipeline that you include has a couple of unusual tokens:&|
and&1
. Can you explain what these are supposed to do? Also, could you describe what the pipeline is aiming at doing as a whole? At the moment, it seems as if your are trying to pick a random file matchingpcm*
under/dev/snd
and do... something with it? How is yoursed
command connected with this?
â Kusalananda
2 days ago
Its frustrating how when I type something the actual text is altered I think is a php parse thing.
â openInvent
7 hours ago
see man bash | grep "|" this line If |& is used, for 2>&1 |. This implicit redirection of the standard error to the operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or Of these list operators, && and || have equal precedence, followed by ; the && and || control operators, respectively. AND and OR lists are command1 || command2
â openInvent
7 hours ago
add a comment |Â
2
The pipeline that you include has a couple of unusual tokens:&|
and&1
. Can you explain what these are supposed to do? Also, could you describe what the pipeline is aiming at doing as a whole? At the moment, it seems as if your are trying to pick a random file matchingpcm*
under/dev/snd
and do... something with it? How is yoursed
command connected with this?
â Kusalananda
2 days ago
Its frustrating how when I type something the actual text is altered I think is a php parse thing.
â openInvent
7 hours ago
see man bash | grep "|" this line If |& is used, for 2>&1 |. This implicit redirection of the standard error to the operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or Of these list operators, && and || have equal precedence, followed by ; the && and || control operators, respectively. AND and OR lists are command1 || command2
â openInvent
7 hours ago
2
2
The pipeline that you include has a couple of unusual tokens:
&|
and &1
. Can you explain what these are supposed to do? Also, could you describe what the pipeline is aiming at doing as a whole? At the moment, it seems as if your are trying to pick a random file matching pcm*
under /dev/snd
and do... something with it? How is your sed
command connected with this?â Kusalananda
2 days ago
The pipeline that you include has a couple of unusual tokens:
&|
and &1
. Can you explain what these are supposed to do? Also, could you describe what the pipeline is aiming at doing as a whole? At the moment, it seems as if your are trying to pick a random file matching pcm*
under /dev/snd
and do... something with it? How is your sed
command connected with this?â Kusalananda
2 days ago
Its frustrating how when I type something the actual text is altered I think is a php parse thing.
â openInvent
7 hours ago
Its frustrating how when I type something the actual text is altered I think is a php parse thing.
â openInvent
7 hours ago
see man bash | grep "|" this line If |& is used, for 2>&1 |. This implicit redirection of the standard error to the operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or Of these list operators, && and || have equal precedence, followed by ; the && and || control operators, respectively. AND and OR lists are command1 || command2
â openInvent
7 hours ago
see man bash | grep "|" this line If |& is used, for 2>&1 |. This implicit redirection of the standard error to the operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or Of these list operators, && and || have equal precedence, followed by ; the && and || control operators, respectively. AND and OR lists are command1 || command2
â openInvent
7 hours ago
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
2
The pipeline that you include has a couple of unusual tokens:
&|
and&1
. Can you explain what these are supposed to do? Also, could you describe what the pipeline is aiming at doing as a whole? At the moment, it seems as if your are trying to pick a random file matchingpcm*
under/dev/snd
and do... something with it? How is yoursed
command connected with this?â Kusalananda
2 days ago
Its frustrating how when I type something the actual text is altered I think is a php parse thing.
â openInvent
7 hours ago
see man bash | grep "|" this line If |& is used, for 2>&1 |. This implicit redirection of the standard error to the operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or Of these list operators, && and || have equal precedence, followed by ; the && and || control operators, respectively. AND and OR lists are command1 || command2
â openInvent
7 hours ago