Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 25, 2023, 08:26:47 08:26


Login with username, password and session length


Pages: [1]
Print
Author Topic: a question about speeding up a script in linux  (Read 706 times)
0 Members and 1 Guest are viewing this topic.
sphinx
Hero Member
*****
Offline Offline

Posts: 873

Thank You
-Given: 593
-Receive: 228



« on: March 04, 2023, 04:24:38 16:24 »

sorry might not be the right place to ask

i have made a short/small bash script in linux(debian sid) which i am using to update my collection of "deb" files i like to be on hand
i am wondering if there is a way/ways to speed it up

#START
#!/bin/sh

# get list of DEB packages in folder sort them and delete duplicates
debdata=`ls /var/cache/apt/archives | cut -d"_" -f1 | sort | uniq -u`

# get each package from debdata
for debpackage in $debdata ; do
    # print on screen
    echo $debpackage
    # only download package quietly no install
    apt-get -y -d -qq reinstall $debpackage
done
# END
Logged

laws of physics are not laws at all, just assumptions and formulas that work as long as we don't figure something new that wrecks the calculations. the infinite onion try to peel that one
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC