General TC > Programming & Scripting - Unofficial

script to search your local TCE.dep files for a named TCE

(1/1)

aus9:
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: ---#!/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
--- End code ---

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: ---searchtce
input TCE without dot tcz please
shared-mime-info
gtk2.tcz.dep
gtk3.tcz.dep
wicd.tcz.dep
xdg-utils.tcz.dep
--- End code ---

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

Navigation

[0] Message Index

Go to full version