Saturday, May 4, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1327  / 1 Year ago, tue, may 2, 2023, 4:11:43

Good Day!



I am creating a Shell Script so I can then use it to do X (Won't tell)



This is my Current Script



clear
echo Ahmad A Kazi
echo IDNO: BD_3456
echo
echo Data Clear Program
echo c 2015 Ahmad A Kazi
echo
echo First Update
echo
apt-get update
echo
echo Purge Programs
echo
apt-get purge cmake -y
apt-get purge libtool -y
apt-get purge libcurl4-openssl-dev -y
apt-get purge libjansson-dev -y


This is Just Part of The Script because rest is Proprietary



I want this to be there on top of the Script Output and not Change it's position the Whole Time, this text below should be consistently on the Top The Whole Time



===========================================
Ahmad A Kazi
Copyright 2015, The DNACoin Developers

===========================================


For Example



===========================================
Ahmad A Kazi
Copyright 2015, The DNACoin Developers

===========================================

Some thing else is going on......


This Something Else should not end up Removing My Name and Copyright
Also, how to print Time and keep on self updating....



Please help!



Thank You


More From » command-line

 Answers
1

Here's my script. It uses tput cup Y-location X-location and continuously places that info on top of the screen using while loop. You might wanna adjust it for your application but the point is clear. Now give me 3.50$ because this script is copyrighted ;)



#!/bin/sh

clear
while true; do
clear
tput cup 0 0
printf "===========
SERG KOLO
================Copyright 2015
=================="
sleep 1
tput cup 10 10
echo TEST line one of script
echo "Do you love Ubuntu ? "
read answer
case $answer in

y) echo " Have a cookie :3 ";;
n) echo " Go away, Windows lover ";;
*) echo only y or n ;;
esac

sleep 1

df -h

sleep 1

free -h
sleep 1


done


enter image description here


[#20877] Tuesday, May 2, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
montwim

Total Points: 103
Total Questions: 112
Total Answers: 120

Location: Vietnam
Member since Mon, Mar 14, 2022
2 Years ago
;