Search Results

Search: Posts Made By: CarloM
2,345
Posted By CarloM
So, you could extract the allowed groups from...
So, you could extract the allowed groups from sshd.conf, and query LDAP to get the users in those groups.

On our systems this would be something like:
for group in $(awk '/AllowGroups/...
Forum: What is on Your Mind? 07-25-2018
4,641
Posted By CarloM
Having preview on every thread makes the forum...
Having preview on every thread makes the forum display pretty cluttered, imo.
15,283
Posted By CarloM
-S none /web/Transfer_Files/data/ -S doesn't...
-S none /web/Transfer_Files/data/
-S doesn't take an argument (at least on Ubuntu Linux), so I'd guess it's interpreting none as a source (relative to cwd, which is presumably /web/Transfer_files)
2,328
Posted By CarloM
df -Bg should work
df -Bg should work
2,441
Posted By CarloM
Shouldn't df -P (or df -hP) force one line per...
Shouldn't df -P (or df -hP) force one line per filesystem?
2,653
Posted By CarloM
You want to purge the files from the tar as...
You want to purge the files from the tar as they're extracted?

You could try listing the files in the tar, then extracting & deleting each one in turn. Something like:
filelist=$(tar -tvf...
2,535
Posted By CarloM
I don't think awk supports indirect referencing...
I don't think awk supports indirect referencing for variables.

In this case it looks like you could just use an array anyway.
3,799
Posted By CarloM
You could try using file and checking if each...
You could try using file and checking if each file found appears to be a cert store of some kind, then using openssl to actually read it.
23,316
Posted By CarloM
From the (Linux) man page:
From the (Linux) man page:
1,215
Posted By CarloM
You've left in the esac for the case statement...
You've left in the esac for the case statement which you've deleted.
1,701
Posted By CarloM
-vCOMP='20150430'
-vCOMP='20150430'
Forum: AIX 05-26-2015
5,254
Posted By CarloM
You can use SetGID, but SetUID is ignored for...
You can use SetGID, but SetUID is ignored for directories on must Unix & Linux systems, as far as I know. (Except BSD, apparently. It definitely doesn't work on AIX.)

Can't you run the script as...
1,626
Posted By CarloM
What have you tried? awk 'FNR==8 || FNR==10 ||...
What have you tried?
awk 'FNR==8 || FNR==10 || (FNR>=13 && FNR<=250)' sample.txt
should work.
5,547
Posted By CarloM
Do you mean you want the output in fixed-width...
Do you mean you want the output in fixed-width columns?
5,547
Posted By CarloM
Do you have GNU awk? Try: awk '/NOD/...
Do you have GNU awk?

Try:
awk '/NOD/ {print $2 OFS $4 OFS $11}' FS=' |\\]|\\[|\\)|\\(' Output.TXT

Or this should work on any version:
awk '/NOD/ {print $2 OFS substr($3,2,length($3)-2) OFS...
Forum: Red Hat 01-05-2015
19,817
Posted By CarloM
iirc, it's either /etc/security/limits.conf or a...
iirc, it's either /etc/security/limits.conf or a sysctl value.
Forum: War Stories 02-06-2015
6
6,236
Posted By CarloM
Well, it's much cooler than plain grep :P. ...
Well, it's much cooler than plain grep :P.

(I do the same thing so often I actually aliased it).
992
Posted By CarloM
If you give your select a name then when the user...
If you give your select a name then when the user submits the form the selected value will be in the _POST array.

e.g. something like:

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
...
1,095
Posted By CarloM
It would be a lot easier to see if you indented...
It would be a lot easier to see if you indented your code.
1,733
Posted By CarloM
You could just use a for loop: for filename...
You could just use a for loop:

for filename in $(find . -type f -iname "*.rtf.rtf")
do
mv ${filename} ${filename%.rtf}
done

(If you have filenames with spaces in them or uppercase...
4,347
Posted By CarloM
On Linux you're most likely running mawk or GNU...
On Linux you're most likely running mawk or GNU awk, both of which will re-calculate $0 if you assign to a field (or change NF, although that might depend on the version).

Whatever HP-UX is using...
2,083
Posted By CarloM
Why do you have quotes on the asterisk? Try ...
Why do you have quotes on the asterisk?

Try
sed 's/, *;/;/g'
1,696
Posted By CarloM
That's not particularly clear, I'm afraid. cat...
That's not particularly clear, I'm afraid.
cat <File name> | awk -F###<......>
if Day = Monday
then
We need to get TABSCHEMA1 and TABNAME1 in separate variables
Later
We use those...
1,912
Posted By CarloM
'NR==FNR { f2[$4]=$2 OFS $3 OFS $5 }For...
'NR==FNR {
f2[$4]=$2 OFS $3 OFS $5
}For lines in the first file specified on the command line (total record number equals file record number): Set an array ('f2') element indexed by the value of...
2,983
Posted By CarloM
Is your file already sorted?
Is your file already sorted?
Showing results 1 to 25 of 240

 
All times are GMT -4. The time now is 12:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy