r/zsh • u/[deleted] • Mar 20 '22
Is it possible to delete a variable in an array found in a python file using zsh?
I know this isn't practical, but I'm more just curious if this is possible as I am new to zsh aside from basic commands. If it is possible, how would I go about doing it? From what I could find on google it seems like maybe sed would be my best bet?
0
Upvotes
3
u/catwok Mar 20 '22 edited Mar 20 '22
Umm look into sed or awk first. Then you can look into bash/zsh aliases to wrap up your solution with a terminal function.
But also you should make an edit and provide more context to your problem. Chances are we might have another direction for depending on what your problem statement is.
Like why do you need to rm a variable? Do you need to delete the value or the variable itself? And again why? Why do you need to predictably delete the same variable to a python script all the time?