Search Results

Search: Posts Made By: dr.house
16,137
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...
15,324
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 "$?"
15,324
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,067
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,563
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,286
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,722
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,134
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
1,804
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...
1,804
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...
11,795
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...
11,795
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)?
6,610
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,253
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,231
Posted By dr.house
#!/bin/bash
#!/bin/bash
1,791
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
...
18,513
Posted By dr.house
grep -n $( sort -g data | head -n 1 ) data
grep -n $( sort -g data | head -n 1 ) data
1,366
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,655
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,655
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,606
Posted By dr.house
case $arg in
case $arg in
1,462
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
1,830
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
27,696
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,515
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 12:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy