WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: script to search your local TCE.dep files for a named TCE  (Read 1846 times)

aus9

  • Guest
script to search your local TCE.dep files for a named TCE
« on: July 27, 2020, 01:08:39 AM »
firstly this is based a little on my poor memory of what a moderator supplied me years ago.
that script which I no longer had interacted with the repo.

this is a script that searches only your locally installed TCEs
it requires you to input the real name without the trailing .tcz

I stole a fair bit of coding from Rich forum post

I make it executable and have it in ~/.local/bin called searchtce
Code: [Select]
#!/bin/sh
read -t 10 -p "input TCE without dot tcz please
" INPUT
grep -l $INPUT.tcz /etc/sysconfig/tcedir/optional/*.dep | cut -d/ -f6

I added timer of 10 seconds. Use copy and paste if you are a slow typer or remove the timer please

Here is an example

Code: [Select]
searchtce
input TCE without dot tcz please
shared-mime-info
gtk2.tcz.dep
gtk3.tcz.dep
wicd.tcz.dep
xdg-utils.tcz.dep

It should be clear that all files ending in .dep are the "hits"

trivia
My main reason for using it is to track down what is loading a target TCE

there may be other uses. Hope it helps someone
« Last Edit: July 27, 2020, 01:10:44 AM by aus9 »