Я установил gpodder 3.8.3 (используя этот ppa: https://launchpad.net/~thp/+archive/ubuntu/gpodder), но мне также нужно было установить python-gpod, чтобы заставить синхронизацию ipod работать , Невозможно заставить обложку альбома работать.
Вы можете попробовать эту команду, чтобы получить ответ:
A="0012"
echo $A + 1 | bc
Более подробную информацию о команде bc можно найти здесь.
bc man page:
NAME
bc - An arbitrary precision calculator language
SYNTAX
bc [ -hlwsqv ] [long-options] [ file ... ]
DESCRIPTION
bc is a language that supports arbitrary precision numbers with interactive execution of statements. There are some similarities
in the syntax to the C programming language. A standard math library is available by command line option. If requested, the
math library is defined before processing any files. bc starts by processing code from all the files listed on the command line
in the order listed. After all files have been processed, bc reads from the standard input. All code is executed as it is read.
(If a file contains a command to halt the processor, bc will never read from the standard input.)
This version of bc contains several extensions beyond traditional bc implementations and the POSIX draft standard. Command line
options can cause these extensions to print a warning or to be rejected. This document describes the language accepted by this
processor. Extensions will be identified as such.
Альтернативный метод может состоять в том, чтобы сохранить ваши переменные целыми числами и преобразовать их в строку в конце:
A=12
B=$((A+1))
echo $B
13
C=$( printf '%04d' $B )
echo $C
0013
Этот стиль работы с целыми числами в математике и преобразование в строку для ответа более интуитивно понятный для меня, поскольку я привык к программированию BASIC. Я ценю, что у Bash нет переменных ввода, таких как C и BASIC, но притворяясь, что это делает меня счастливым.