Search Results

Search: Posts Made By: kamauv234
1,673
Posted By clx
My guess is you are executing "wrapper.sh"...
My guess is you are executing "wrapper.sh" instead sourcing.


# try
. ./wrapper.sh

#instead
./wrapper.sh
1,139
Posted By RavinderSingh13
Hello Kamal, Following may help you in...
Hello Kamal,

Following may help you in same.


awk 'BEGIN{split("ABCDEFGHIJKLMNOPQRSTUVWXYZ", A, "")} {print $0 ":" A[++i]} END{ORS="";print "\n"}' ORS=" " Input_file


Output will be as...
1,427
Posted By Scrutinizer
Try something like: #!/bin/bash ...
Try something like:

#!/bin/bash
nodecount=10
host=na7-db1-1-chi
IFS=- read -a H <<< "$host"
C=({A..Z})
for ((i=1; i<=nodecount; i++))
do
printf "%s "...
1,427
Posted By RudiC
Try read -a H, and then read the man bash
Try read -a H, and then read the man bash
14,649
Posted By Akshay Hegde
Try : $ ps -ef | grep pmon | grep -v grep |...
Try :

$ ps -ef | grep pmon | grep -v grep | grep -v asm | awk -F'[ _]' '{print $1,$NF}'
$ ps -ef | grep pmon | grep -v grep | grep -v asm | awk '{s=$1;sub(/.*_/,x);print s,$1}'
14,649
Posted By Don Cragun
Excellent idea Akshay. Note, however, that some...
Excellent idea Akshay. Note, however, that some versions of awk sometimes (depending on field widths) use a tab as well as spaces as field delimiters. To be safe you might want to use:
awk -F'[...
14,649
Posted By clx
If want to avoid the some of the pipes, ps...
If want to avoid the some of the pipes,

ps -ef | awk '/pmon/ && !/asm/ && !/grep/ {x=$1;gsub(/.*_/,_);print x FS $0}'

I guess, the process owner would be always oracle? as its an oracle...
14,649
Posted By Don Cragun
Try: ps -ef | grep pmon | grep -v grep | grep...
Try:
ps -ef | grep pmon | grep -v grep | grep -v asm | awk '
{ n = split($NF, u, /_/)
print $1, u[n]
}'
1,082
Posted By SriniShoo
awk -v q="'" 'BEGIN{FS="\n"; RS=""; HEAD =...
awk -v q="'" 'BEGIN{FS="\n"; RS="";
HEAD = "set echo on timing on feedback on \
\nspool alter_diskgroup.add_datadg_disks_1.log \
\nalter diskgroup DATADG add disk";
TAIL = ";\nspool off \...
1,082
Posted By Don Cragun
If you change: for(j = i+1; j <= i+4;...
If you change:
for(j = i+1; j <= i+4; j++)in SriniShoo's awk script to:
for(j = i+1; j <= i+3; j++)
it should do what you want on your system. It uses one construct on all of the print...
1,160
Posted By michaelrozar17
Something like this..? michaelf>uname SunOS ...
Something like this..?
michaelf>uname
SunOS
michaelf>nawk -F'[: ]' '/Parameter Name/{f=$5;getline;print f"-->"$5}' infile
SNAPSHOTTIMESTAMP-->2014-01-07-15.21.50.022423
DATABASESIZE-->96178176...
1,246
Posted By Scrutinizer
yet another awk: awk -F'[ \t\n.]'...
yet another awk:
awk -F'[ \t\n.]' '/ORATEXT/{print $10 (++c[$10]), $5}' RS= OFS=" -> " file
1,246
Posted By pamu
try this.. awk -F "[. ]" '{if($0...
try this..


awk -F "[. ]" '{if($0 ~/ORATEXT : cluster_interconnect/){a++;print $3a,s}else if($0 ~/ORATEXT : public/){b++;print $3b,s}else{s=$5}}' OFS=" -> " file
1,246
Posted By elixir_sinari
Like this? awk '/^ORATEXT :...
Like this?
awk '/^ORATEXT : (cluster_interconnect|public)/{
sub(/([^.]+[.]){4}/,"",p)
sub(/[.].*/,"",p)
print $3,p}{p=$0}' OFS=' -> ' file
BTW, I like the looks of this regexp... :D
Forum: Linux 08-31-2012
3,940
Posted By fpmurphy
Are you sure the install directives are correct? ...
Are you sure the install directives are correct? Maybe change to something like the following to test installation:

%install
make DESTDIR=%buildroot install
1,626
Posted By RudiC
To protect it from changes in the order the...
To protect it from changes in the order the adapters occur, try this version:
awk 'BEGIN {RS="/"; FS="[= \"]+"}
/cluster_interconnect/ {sub("cluster_interconnect","Private"++ct)}
...
1,626
Posted By RudiC
This will do the job for your example: awk ...
This will do the job for your example:
awk 'BEGIN {RS="/"; FS="[= \"]+"}
/Adapter/ {
for (i=NF;i>=1;i--) if ($i=="Adapter") break;
...
30,710
Posted By itkamaraj
echo $ip | perl -pe 's/ /\n/g' echo $ip |...
echo $ip | perl -pe 's/ /\n/g'

echo $ip | sed 's/ /\n/g'
30,710
Posted By praveen_reddy
echo $ips | tr -s " " "\n"
echo $ips | tr -s " " "\n"
30,710
Posted By alister
If the value of the variable already has embedded...
If the value of the variable already has embedded newlines, then all you have to do is quote the variable. If not, you can use the tr utility to convert the embedded whitespace to newlines.
...
30,710
Posted By elixir_sinari
echo $ips|xargs -n1
echo $ips|xargs -n1
1,877
Posted By Chubler_XL
How about this using bash: #!/bin/bash ...
How about this using bash:

#!/bin/bash
IFS=' .v' V=( $(perl --version) )
[ ${V[3]:-0} -le 5 ] && [ ${V[3]:-0} -ne 5 -o ${V[4]} -lt 8 ] && exit 1
echo "Perl version ${V[3]}.${V[4]}.${V[5]} is...
Showing results 1 to 22 of 22

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