Search Results

Search: Posts Made By: dr.house
17,120
Posted By dr.house
My main system's /etc/profile contains the...
My main system's /etc/profile contains the following:


case $UID in
0)
export PS1="\[\e[31m\][root@leonov]\[\e[0m\] "
export PS2="\[\e[31m\][...........]\[\e[0m\] "
;;
1000)
export...
16,272
Posted By dr.house
mount -f -t cifs //10.180.8.23/downloads -o...
mount -f -t cifs //10.180.8.23/downloads -o username=username,password=password; echo "$?"
16,272
Posted By dr.house
You may want to check the results of a faked...
You may want to check the results of a faked mount, e.g.:


[root@leonov] mount -f -a; RV=$?; echo "Return Value: $RV"
Return Value: 0
[root@leonov] mount -f crap; RV=$?; echo "Return Value:...
2,239
Posted By dr.house
Could you, please, post some of those "input...
Could you, please, post some of those "input lines", or, even better, the whole "limit file"?
Forum: Solaris 07-24-2010
3,728
Posted By dr.house
Depending on the OS in use, adding a swap file...
Depending on the OS in use, adding a swap file could be an option, too - on the long run, however, I'd recommend taking a very close look on the Java apps running on the server (- merely a gut...
1,375
Posted By dr.house
[house@leonov] X='/data1/apps/TEST'; Y=$(basename...
[house@leonov] X='/data1/apps/TEST'; Y=$(basename $X)_backup[etc.pp.]; echo "$Y"
TEST_backup[etc.pp.]
1,884
Posted By dr.house
Spam in, spam out :D (Not sure I'm getting you...
Spam in, spam out :D (Not sure I'm getting you right, though ...)


[house@leonov] cat data1
175
175
175
176
176
177
[house@leonov] cat data2
176
177
178
177
178
178
[house@leonov]...
1,210
Posted By dr.house
[house@leonov] cat data | sed 's/ //g' | awk -F...
[house@leonov] cat data | sed 's/ //g' | awk -F "[()=]" '{if (NF>6) {print $1,$5} else {print $1,$3}}'
string number
date start_date
decimal type
string name
2,243
Posted By dr.house
Concept: [house@leonov] cat code ...
Concept:


[house@leonov] cat code
#!/bin/bash

while read NAME
do
echo "mv $NAME $( echo $NAME | sed 's/m04-//g' )"
done < data

exit 0
#finis
[house@leonov] bash code
mv...
2,243
Posted By dr.house
Why not ... [house@leonov] cat data ...
Why not ...


[house@leonov] cat data
m04-npt06-z30-syn.ps
m04-npt06-dp018-8x6smp.vmod
m04-npt06-sr40-syn-dp01-16x12drw.params
[house@leonov] cat data | sed 's/m04-//g'
npt06-z30-syn.ps...
12,182
Posted By dr.house
You could, for example, include blanks and/or...
You could, for example, include blanks and/or line endings:


[house@leonov] cat data
81 5 77 78
8373 9 7877 7878
[house@leonov] cat data | grep '77 78'
81 5 77 78
8373 9 7877 7878...
12,182
Posted By dr.house
Unlikely, I daresay - would you care to proof...
Unlikely, I daresay - would you care to proof (read: show us "working" vs. "failing" data)?
7,144
Posted By dr.house
man grep (http://linux.die.net/man/1/grep): ...
man grep (http://linux.die.net/man/1/grep):

"grep searches the named input files (or standard input if no files are named ...)."
7,589
Posted By dr.house
[house@leonov] cat code #!/bin/bash echo...
[house@leonov] cat code
#!/bin/bash

echo "$1" | fold -w1 | sort | uniq -c

exit 0
#finis
[house@leonov] bash code kamaraj
3 a
1 j
1 k
1 m
1 r...
4,532
Posted By dr.house
#!/bin/bash
#!/bin/bash
2,027
Posted By dr.house
#!/bin/bash while read LINE do case...
#!/bin/bash

while read LINE
do
case ${LINE:0:1} in
"W") WD=$( echo $LINE | cut -d'|' -f2 ) ;;
"R") RD=$( echo $LINE | cut -d'|' -f2 ) ;;
"#") continue ;;
esac
done < data
...
19,606
Posted By dr.house
grep -n $( sort -g data | head -n 1 ) data
grep -n $( sort -g data | head -n 1 ) data
1,457
Posted By dr.house
Ad hoc, I can't spot anything "ksh-specific" in...
Ad hoc, I can't spot anything "ksh-specific" in the code you posted - what happens if you just try:


sh script
3,969
Posted By dr.house
# if (length($0)>10) {print $0" ???"} if...
# if (length($0)>10) {print $0" ???"}
if (length($0)>10) {print substr($0,1,10)}
3,969
Posted By dr.house
#!/bin/bash cat data | cut -d':' -f4 | sed...
#!/bin/bash

cat data | cut -d':' -f4 | sed 's/[ -]//g;s/[()x.]//g' \
| awk '{
if (length($0)>10) {print $0" ???"}
else if (length($0)==10) {print $0}
else if (length($0)==5...
1,738
Posted By dr.house
case $arg in
case $arg in
1,601
Posted By dr.house
awk -F',' 'OFS="," {if ($6=="403") {print...
awk -F',' 'OFS="," {if ($6=="403") {print $1,$3,$10,$11,$12}}' data.file
2,169
Posted By dr.house
awk -F',' 'OFS=","...
awk -F',' 'OFS="," {{$2=substr($2,5,4)substr($2,3,2)substr($2,1,2)} {print $1,$2,$3}}' data.file
29,208
Posted By dr.house
cat data | sed 's/[- ()]*//g' | awk '{print...
cat data | sed 's/[- ()]*//g' | awk '{print substr($1,length($1)-4,4)}'
3,970
Posted By dr.house
awk -F '|' 'NFS=OFS="|" {if ($3=="P" && $6=="UE"...
awk -F '|' 'NFS=OFS="|" {if ($3=="P" && $6=="UE" && $8=="85") {print $0}}' data.file
Showing results 1 to 25 of 447

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