Unix & Linux
Regular expression problem(s) in Bash: [^negate] doesn’t seem to work
When I execute ls /directory | grep '[^term]' in Bash I get a regular listing, as if the grep command is ignored somehow. I tried the same thing with egrep, I tried to use it with double and single quotes, but to no better results. When I try ls /directory | grep '^[term] I get all entries beginning with term – as expected.
What’s the difference between “>&1” and “>/proc/self/fd/1” redirection?
I’m working on some script that being run by rc.local at startup, and I noticed that output redirection works quite strange.
RHEL 8 Deprecated Network Scripts
I was reading about RHEL 8, and this statement is made:
Shell script to check for the presence of one or more files with a specific extension?
I want to write a script to find a file with specific extension.this much i have done:
Is it possible to nest a ‘find -exec’ within another ‘find -exec’?
Something like the following is what I what I’m after,
but my code doesn’t work, no matter how I escape {} and + ;
Command to Search for Filenames Exceeding 143 Characters?
So some background first: I am attempting to convert a non-encrypted shared folder into an encrypted one on my Synology NAS and am seeing this error:
clear out all variables without closing terminal
I want to know how to clear all variables which I defined in command prompt without closing terminal ?
Building paths robustly
Say I have several variables in a shell script (e.g. in zsh):