Stable: 2.5.2
Development: 2.6-alpha3
Download
Hi,
Is it possible to jump to a variable in a song?
mocp --jump $A s ?
I am getting a Segmentation fault.
I need this in order to make a A-B repeat script.
Thanks!
jcf
Mon, 2017-10-23 07:09
Permalink
Yes, but (assuming the variable contains a numeric value) you will need to write it as '${A}s'.
${A}s
MOC still shouldn't segfault, though. Which release of MOC are you running?
JohnSmith
Mon, 2017-10-23 07:21
Version : 2.6-alpha3 I am running.
5509 Segmentation fault mocp --jump ${sA}s
I get, running on Debian stable.
Mon, 2017-10-23 07:40
I added a line in my script to see whether $sA is integer or not; it says it is:
[[ $sA == ?(-)+([0-9]) ]] && echo "$sA is an integer"
Mon, 2017-10-23 08:07
says --jump=N{%,s} Jump to some position in the current track
So I tried: mocp --jump=$sA{s}
It did not help.
Thanks
Mon, 2017-10-23 08:28
Where did the additional 's' come from?
You're confusing two syntaxes here: shell and documentation.
Mon, 2017-10-23 09:17
(sA is a variable, the other s stands for seconds.) Any way: This is : Music On Console Version : 2.5.2 Revision : 2930 Built : Oct 23 2017 11:00:40
The A-B repeat now works.
Mon, 2017-10-23 09:18
is working, I forgot to mention.
Mon, 2017-10-23 22:38
The segfault was fixed in r2942 and has not yet made it into a release.
jcf
Mon, 2017-10-23 07:09
Permalink
Syntax
Yes, but (assuming the variable contains a numeric value) you will need to write it as '
${A}s
'.MOC still shouldn't segfault, though. Which release of MOC are you running?
JohnSmith
Mon, 2017-10-23 07:21
Permalink
Version : 2.6-alpha3 I am
Version : 2.6-alpha3 I am running.
5509 Segmentation fault mocp --jump ${sA}s
I get, running on Debian stable.
Thanks!
JohnSmith
Mon, 2017-10-23 07:40
Permalink
I added a line in my script
I added a line in my script to see whether $sA is integer or not; it says it is:
[[ $sA == ?(-)+([0-9]) ]] && echo "$sA is an integer"
JohnSmith
Mon, 2017-10-23 08:07
Permalink
mocp --help
says
--jump=N{%,s} Jump to some position in the current track
So I tried:
mocp --jump=$sA{s}
It did not help.
Thanks
jcf
Mon, 2017-10-23 08:28
Permalink
The Magical 's'
Where did the additional 's' come from?
You're confusing two syntaxes here: shell and documentation.
JohnSmith
Mon, 2017-10-23 09:17
Permalink
I compiled 2.5.2 and it works!
(sA is a variable, the other s stands for seconds.)
Any way:
This is : Music On Console
Version : 2.5.2
Revision : 2930
Built : Oct 23 2017 11:00:40
The A-B repeat now works.
Thanks!
JohnSmith
Mon, 2017-10-23 09:18
Permalink
mocp --jump ${sA}s
is working, I forgot to mention.
jcf
Mon, 2017-10-23 22:38
Permalink
It Sounded Familiar
The segfault was fixed in r2942 and has not yet made it into a release.