We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db06501 commit 7a55eceCopy full SHA for 7a55ece
doc/source/examples.rst
@@ -122,8 +122,7 @@ The following API does two tasks: add users and fetch users.
122
123
USER_NAME=$(mock get-payload name)
124
USER_EMAIL=$(mock get-payload email)
125
- USER_COUNT=$(ls $DATA_DIR | wc -l)
126
- NEW_USER_ID="$(printf "%s + 1\n" "${USER_COUNT}" | bc)"
+ NEW_USER_ID="$(ls $DATA_DIR | wc -l | sed "s/$/+1/" | bc)"
127
128
printf "New user ID generated: %s\n" "${NEW_USER_ID}"
129
0 commit comments