Search Results

Search: Posts Made By: CarloM
Forum: What is on Your Mind? 07-25-2018
4,629
Posted By CarloM
Having preview on every thread makes the forum...
Having preview on every thread makes the forum display pretty cluttered, imo.
2,342
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/...
15,274
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,319
Posted By CarloM
df -Bg should work
df -Bg should work
2,419
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,534
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,792
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.
1,214
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,697
Posted By CarloM
-vCOMP='20150430'
-vCOMP='20150430'
Forum: AIX 05-26-2015
5,247
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,624
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,546
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,546
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...
23,311
Posted By CarloM
From the (Linux) man page:
From the (Linux) man page:
Forum: War Stories 02-06-2015
6
6,228
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).
991
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,093
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.
Forum: Red Hat 01-05-2015
19,812
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.
1,729
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,344
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,075
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,694
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,909
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...
1,352
Posted By CarloM
awk '{diff=$4-$3; diff=diff >= 0 ? diff:-diff;...
awk '{diff=$4-$3; diff=diff >= 0 ? diff:-diff; if (diff > diffs[$1]) {diffs[$1]=diff;lines[$1]=$0}} END {for (i in lines) {print lines[i]}}' fileIf field 4 is always going to be greater than field 3...
2,981
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 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy