Search Results

Search: Posts Made By: CarloM
Forum: What is on Your Mind? 07-25-2018
4,586
Posted By CarloM
Having preview on every thread makes the forum...
Having preview on every thread makes the forum display pretty cluttered, imo.
2,310
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,214
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,281
Posted By CarloM
df -Bg should work
df -Bg should work
2,343
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,521
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,775
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,199
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,687
Posted By CarloM
-vCOMP='20150430'
-vCOMP='20150430'
Forum: AIX 05-26-2015
5,216
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,613
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,523
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,523
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,290
Posted By CarloM
From the (Linux) man page:
From the (Linux) man page:
Forum: War Stories 02-06-2015
6
6,149
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).
988
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,088
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,785
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,719
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,334
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,054
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,689
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,907
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,345
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,968
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 01:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy