Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 23, 2024, 01:01:09 13:01


Login with username, password and session length


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

Posts: 918

Thank You
-Given: 614
-Receive: 270



« 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