# Number Guessing Game - Build a Number Guessing Game

Tell us what’s happening:
Describe your issue in detail here.
How can I remove UPDATE 1 from showing in the output
#!/bin/bash

PSQL=“psql --username=freecodecamp --dbname=number_guess -t --no-align -c”

then
echo “Welcome, \$USER_NAME! It looks like this is your first time here.”
insert=\$(\$PSQL “insert into user_games (username, games_played, best_game) values (‘\$USER_NAME’, 0, 0)”)
games_played=0
best_game=0
else
games_played=\$(\$PSQL “SELECT games_played FROM user_games WHERE username = ‘\$USER_NAME’”)
best_game=\$(\$PSQL “SELECT best_game FROM user_games WHERE username = ‘\$USER_NAME’”)
echo “Welcome back, \$USER_NAME! You have played \$games_played games, and your best game took \$best_game guesses.”
fi

RAN_NUM=\$[ \$RANDOM % 1000 + 0 ]

echo \$RAN_NUM

echo “Guess the secret number between 1 and 1000:”

GUESS=1
do

# GUESS=\$((GUESS+1))

if [[ \$input_number =~ [1]+\$ ]];
then
GUESS=\$((GUESS+1))
if [ \$input_number -eq \$RAN_NUM ];
then
let “games_played+=1”
echo “You guessed it in \$((GUESS-1)) tries. The secret number was \$RAN_NUM. Nice job!”
break;
else
if [ \$input_number -lt \$RAN_NUM ];
then
echo “It’s higher than that, guess again:”
elif [ \$input_number -gt \$RAN_NUM ];
then
echo “It’s lower than that, guess again:”
fi
fi
else
echo “That is not an integer, guess again:”
fi

done
if ((\$best_game==0)) || ((\$best_game>\$GUESS));
then
(\$PSQL “update user_games set best_game=\$GUESS, games_played=\$games_played where username = ‘\$USER_NAME’”)
else
(\$PSQL “update user_games set games_played=\$games_played where username = ‘\$USER_NAME’”)
fi

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 OPR/100.0.0.0`