Search Results

Search: Posts Made By: ux4me
1,172
Posted By ux4me
Thanks RudiC.. I added alphanumeric search/sub as...
Thanks RudiC.. I added alphanumeric search/sub as well per below:


awk '{sub(/-[aA0-zZ9]*$/,",&", $NF) ; sub (/,-/,",", $NF)}1'
16,404
Posted By ux4me
This works by setting echo "$var1"
This works by setting echo "$var1"
1,172
Posted By ux4me
How can i comma-delimited last field in line?
Awk gurus,

Greatly appreciate for any kind of assistance from the expert community

Input line:

abc,11.22.33.44,xyz,7-8-9-10
pqr,111.222.333.444,wxy,1-2-3
def,22.33.44.55,stu,7-8


used...
16,404
Posted By ux4me
Echo awk output from its variable
Stumped with the formatting of the awk output when used with variables, e.g.:


awk -F, 'BEGIN {OFS=","} print {$2,$3,$4}' $infile1

produces the desired output (with rows), but when echoing the...
6,713
Posted By ux4me
thanks for the expect code, but do we know if we...
thanks for the expect code, but do we know if we can replace telnet with another tool, e.g. ssh to test for open and listening ports on the remote system?
14,161
Posted By ux4me
Your 1-liner works perfectly! awk...
Your 1-liner works perfectly!

awk 'ORS=NR%7?FS:RS' infile


I was simply trying to understand how the NR thingy works.. Thanks again!
14,161
Posted By ux4me
works perfectly.. :b: i tried this but no...
works perfectly.. :b:

i tried this but no luck:

awk 'NR==7{a=$1;next}{a=a$1" "}END{print a}'
14,161
Posted By ux4me
awk to transpose every 7 rows into columns
input:


a1
a2
a3
a4
a5
a6
a7
b1
b2
b3
..
b7
..
z1
..
z7
1,757
Posted By ux4me
How to print only the final path of subdirectories?
Hello, stumped with the find command to show the final path of subdirectories.

Used the command
find /dir1 -type d


Output:

/dir1/dirA
/dir1/dirA/dirB
/dir1/dirA/dirB/dirC


Desired...
2,183
Posted By ux4me
Fixed the awk statement, but it's still not...
Fixed the awk statement, but it's still not showing the desired results :(


awk -F'=' '{
if ( $2 ~ /\+/ ) { C["OK"]++ } else { C["OK"]=0 } ;
if ( $2 ~ /\-/ ) { C["ERROR"]++ } else {...
2,183
Posted By ux4me
Placed the curly bracket at the end and no...
Placed the curly bracket at the end and no parsing error now; however the expected results is not displayed.

stdout:

Status: 215 WAITING, 215 OK



expected:

Status: 215 OK, 0 RUNNING, 0...
2,183
Posted By ux4me
Thanks.. somehow I am getting parsing error when...
Thanks.. somehow I am getting parsing error when i have this:


awk '
/\=\+/ { C["OK"]++ }
/\=\?/ { C["RUNNING"]++ }
/\=\-/ { C["ERROR"]++ }
/\=\0/ { C["WAITING"]++ }
END {
printf "Status: "...
2,183
Posted By ux4me
Thanks for the quick one-liner! awk...
Thanks for the quick one-liner!


awk '/\=\+/ { okcount++ } /\=\-/ { errcount++ } /\=\0/ { waitcount++ } /\=\?/ { runcount++ } END { print "Status: " okcount " OK, " errcount " ERR, " waitcount "...
2,183
Posted By ux4me
Combine 4 awk pattern count statements into 1
Hello fellow awkers,

I am trying to combine the following awk statements into 1 so that the results are more accurate:


awk '/\=\+/ { count++ } END { print count}' filename
awk '/\=\?/ {...
1,580
Posted By ux4me
awk to count start and end keyword in a line
Hello fellow awkers and seders:

need to figure out a way to ensure a software deployment has completed by checking its trace file in which I can store the deployment results as follows:

...
1,885
Posted By ux4me
awk to transpose preceding row to 1st column of next rows
Gurus:

How can I transpose the output below to a format in which I can plot a graph to show VSZ memory usage by PIDs?

stdout:

Tue Jan 22 07:29:19 CUT 2013
42336296 1841272 java wilyadm...
3,197
Posted By ux4me
thanks.. got it working using either: $...
thanks.. got it working using either:


$ echo '12345' | sed "s/./&./g;s/\.$//"
1.2.3.4.5

$ echo '12345' | sed "s/./&./g;s/.$//"
1.2.3.4.5
3,197
Posted By ux4me
How to insert period after each number?
stupid question: trying to use sed to do the following...


$ echo '12345' | sed 's/./&./g'
1.2.3.4.5.


needed this instead: 1.2.3.4.5 but how? please advise
1,715
Posted By ux4me
What if I want to substitute 6144 with a shell...
What if I want to substitute 6144 with a shell variable? For example:


fsize=6144


How would I pass the fsize variable into this 1-liner?


awk -vRS= '{printf("%.1f MB/s...
1,715
Posted By ux4me
awk to calculate timex output
I have a timex 'dd' command that generates an output similar to this:


real 701.92
user 3.06
sys 469.10


for the moment, i m redirecting the output to a temp file to stage the calculation...
4,312
Posted By ux4me
thanks.. works perfect now!
thanks.. works perfect now!
4,312
Posted By ux4me
Thanks.. removed the END block but got this...
Thanks.. removed the END block but got this output:

SAP_J2EEClusterNode=3620850
SAP_J2EEClusterNode=3620850 deployment_forbidden=off
SAP_J2EEClusterNode=3620850 deployment_forbidden=off...
4,312
Posted By ux4me
awk to loop lines and print substring
The input data:

mbeanName: com.sap.default:name=tc~bl~deploy_controller,j2eeType=SAP_J2EEServicePerNode,SAP_J2EEClusterNode=3620850,SAP_J2EECluster=XXX
Get attribute Properties:...
2,185
Posted By ux4me
Ran into a bug where the awk can't handle...
Ran into a bug where the awk can't handle duplicate timestamp value, e.g.:

expected this:

Time: 20120719121947 Host: server0 Instance: J00 Dirs: j2ee
Time: 20120719121947 Host:...
2,185
Posted By ux4me
Thanks to all again... when blank dir is found,...
Thanks to all again... when blank dir is found, replace with "***", for example:


Time: 20120620133029 Host: server1 Instance: J00 Dirs: data,igs,j2ee,sec
Time: 20120620133031 Host:...
Showing results 1 to 25 of 54

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