Skip to content
Snippets Groups Projects
Commit 7f614787 authored by iehl1g23's avatar iehl1g23
Browse files

removed -p from scripts aswell

parent 09a18579
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,13 @@
# Database credentials
DB_USER="root"
DB_PASS=""
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="bnb_temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
mysql -u "$DB_USER" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM bnb_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot
......
......@@ -2,14 +2,13 @@
# Database credentials
DB_USER="root"
DB_PASS=""
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
mysql -u "$DB_USER" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM btc_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot (remove the first line containing column names)
......
......@@ -84,11 +84,10 @@ echo "Dogecoin: Price=$dogeprice, High=$dogehigh, Low=$dogelow"
# Database credentials
DB_USER="root"
DB_PASS=""
DB_NAME="crypto_tracker"
# Insert data into the database
mysql -u $DB_USER -p$DB_PASS $DB_NAME <<EOF
mysql -u $DB_USER $DB_NAME <<EOF
INSERT INTO btc_prices (price, high, low) VALUES ($btcprice, $btchigh, $btclow);
INSERT INTO eth_prices (price, high, low) VALUES ($ethprice, $ethhigh, $ethlow);
INSERT INTO sol_prices (price, high, low) VALUES ($solprice, $solhigh, $sollow);
......
......@@ -2,14 +2,13 @@
# Database credentials
DB_USER="root"
DB_PASS=""
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="doge_temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
mysql -u "$DB_USER" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM doge_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot
......
......@@ -2,14 +2,13 @@
# Database credentials
DB_USER="root"
DB_PASS=""
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="eth_temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
mysql -u "$DB_USER" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM eth_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot (remove the first line containing column names)
......
......@@ -2,14 +2,13 @@
# Database credentials
DB_USER="root"
DB_PASS=""
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="sol_temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
mysql -u "$DB_USER" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM sol_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment