Search Results

Search: Posts Made By: karumudi7
2,627
Posted By MadeInGermany
Mounting with noexec can prevent from accidental...
Mounting with noexec can prevent from accidental run of an executable.
E.g. when clicking on an executable script in a file manager, it might open it in a text editor.
7,635
Posted By rbatte1
Okay, so it's DB2. I think that it is usual for...
Okay, so it's DB2. I think that it is usual for all DB2 users to actually be OS users and you might just need to set up the trust there. You might need to use sudo to run the processes as the...
Forum: AIX 08-03-2017
2,584
Posted By vbe
The easiest: create 3 file systems with the...
The easiest:
create 3 file systems with the wanted size the space left can be allocated later
Not sure you can do it with quotas, and as on holiday ( and cant remember if quota is FS or dir on a...
3,879
Posted By Don Cragun
Looking more closely at the standard, when using...
Looking more closely at the standard, when using -exec command +, the primary always returns success even if one or more executions of the given command fail. Furthermore, if there are two or more...
3,879
Posted By Don Cragun
I assume that the question was rhetorical and...
I assume that the question was rhetorical and that you already know that it won't work. If I understand what you're trying to do, try this:
find . -mtime +60 -name '*[.]__*' ! -name...
3,879
Posted By MadeInGermany
find . -name "*.__*" -mtime +60 ! -name...
find . -name "*.__*" -mtime +60 ! -name "*[Aa][Bb][Cc]*" ! -name "*[Xx][Yy][Zz]*" -exec rm {} \;
917
Posted By Scrutinizer
Hi, have a look ar the substr() function.
Hi, have a look ar the substr() function.
1,414
Posted By RudiC
Try $ awk 'BEGIN {OFS = "\t"} ...
Try $ awk 'BEGIN {OFS = "\t"}
{YR = substr ($0, 28, 4)
X = substr ($0, 79, 1)
Z = substr ($0, 93, 1)
}
X ~ /[1CLBE]/ && Z ==...
1,414
Posted By RudiC
Replace , with ; here: {YR =...
Replace , with ; here: {YR = substr($0,28,4), X = substr($0,79,1)}
^--- ";"
2,498
Posted By Don Cragun
For your new problem, try: awk 'BEGIN {FS = OFS...
For your new problem, try:
awk 'BEGIN {FS = OFS = "|" }
{ match($2, /P.. /)
f2 = " " substr($2, RSTART, RLENGTH)
match($2, / Q../)
f3 = substr($2, RSTART, RLENGTH)...
2,498
Posted By Scrutinizer
awk 'NR==FNR{P[$1]; next}{for(i in P) if($3~i)...
awk 'NR==FNR{P[$1]; next}{for(i in P) if($3~i) {print $1,$2,i; next}}' file2 file1
2,498
Posted By Corona688
The while-loop simply reads every line in...
The while-loop simply reads every line in patterns.txt into the p variable, one by one.

awk
# Use | as the input separator
-F\|
# Set the P variable inside awk to the value of the shell...
2,498
Posted By Yoda
Here is one way of doing it: while read p do ...
Here is one way of doing it:
while read p
do
awk -F\| -v P="$p" '{if(match($2,P)>0) print $1,substr($2,RSTART,RLENGTH); }' OFS=\| filename
done < Patterns.txt
2,078
Posted By jim mcnamara
Not as given find /path/to/source1 -type f...
Not as given

find /path/to/source1 -type f -mtime +30 -exec mv "{}" /path/to/BKP1 \;

Note the change from {} to "{}"
3,014
Posted By Yoda
awk ' BEGIN { uss=0; nss=0; } { if($1=="USED"...
awk ' BEGIN { uss=0; nss=0; } {
if($1=="USED" && ($2=="SEDAN" || $2=="SUV")) uss++; if($2!="SEDAN" && $2!="SUV") nss++;
} END {
printf "%d\n%d\n", nss, uss;
} ' infile
3
4

Note:...
5,045
Posted By pamu
Try sth like this awk...
Try sth like this


awk '{if(!X[$1,$2]++){FIR=FIR?FIR"_"$1" "$2:$1" "$2}
{Y[$1,$2,$3]=$4;Z[$3]++}}END{n=split(FIR,FCL,"_");for(i=1;i<=n;i++){s=s?s"\t"FCL[i]:"\t"FCL[i]}
print s;
for(j in...
10,445
Posted By bakunin
First off, putting passwords in scripts is a VERY...
First off, putting passwords in scripts is a VERY BAD idea. It doesn't matter if they are encrypted or not, because having the password in clear text for all to read is just a small part of the...
10,445
Posted By Corona688
The answer is, simply, "don't do that". If...
The answer is, simply, "don't do that".

If you can retrieve a password, so can a hacker. There's no point.

Never, ever keep around retrievably-stored passwords if you can possibly help it. ...
1,320
Posted By pokerino
use only bc without -l
use only bc without -l
898
Posted By felipe.vinturin
Have you tried this: ls -1 *.dat | \ while...
Have you tried this:

ls -1 *.dat | \
while read fname
do
echo "Current file is: [${fname}]."
done
# Or you can use "find"
find . -name "*.dat" -type f | \
while read fname
do
...
1,473
Posted By max_hammer
#! /bin/ksh set -A array1 11 12 13 14 15 set...
#! /bin/ksh
set -A array1 11 12 13 14 15
set -A array2 abc def ghi ijk lmn
i=0
while [ $i -ne ${#array1
} ]
do
echo " Hello ${array1[i]} ${array2[i]}"
(( i = i + 1 ))
done

...
2,062
Posted By Shell_Life
#!/usr/bin/ksh while read mName mCnt1 mCnt2; do...
#!/usr/bin/ksh
while read mName mCnt1 mCnt2; do
if [[ "${mCnt1}" != "${mCnt2}" ]]; then
echo '<font color="red">'${mName}'</font>' ${mCnt1} ${mCnt2}
else
echo ${mName} ${mCnt1}...
2,062
Posted By Corona688
awk is meant for stuff like this. one-liner: ...
awk is meant for stuff like this. one-liner:

awk 'NR==1 { print } NR>1 { if($2 != $3) printf("<font color="red">%s</font>\n", $0); else print; }' < infile

with more explanation:

awk '
# If...
1,164
Posted By radoulov
Do you have an empty line at the end of the file?...
Do you have an empty line at the end of the file? Try this:

awk -F\; 'END {
print idc, id2c
for (i = 0; ++i <= i1;) {
printf "%s", id1[i] OFS
for (j = 0; ++j <= i2;)
...
12,779
Posted By MacMonster
Use "pre" tag in html to show your content. It...
Use "pre" tag in html to show your content. It will process the line breaks. Otherwise, you need to convert the "\n" to "<br>".

The code will look like this:


outputFile="sample.log"
( ...
Showing results 1 to 25 of 26

 

Featured Tech Videos

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