Trying to redirect and prefix sudo to the next inline command? [on hold]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












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










share|improve this question









New contributor




openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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 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










  • 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














up vote
0
down vote

favorite
1












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










share|improve this question









New contributor




openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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 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










  • 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












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





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










share|improve this question









New contributor




openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 7 hours ago





















New contributor




openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Oct 25 at 9:39









openInvent

113




113




New contributor




openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






openInvent is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




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 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










  • 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




    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










  • 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















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay