awk don't work in hp-ux 11.11


 
Thread Tools Search this Thread
Operating Systems HP-UX awk don't work in hp-ux 11.11
# 8  
Old 06-21-2010
Hm,
just a shot in the dark, try this:

Code:
(export LC_ALL=C; bdf | awk '{print $5}')

# 9  
Old 06-21-2010
Quote:
Originally Posted by radoulov
Hm,
just a shot in the dark, try this:

Code:
(export LC_ALL=C; bdf | awk '{print $5}')



Code:
# export LC_ALL=C; bdf | awk '{print $5}'
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    7110656 2231424 4841544   32% /
/dev/vg00/lvol1    1014648   51616  861560    6% /stand
/dev/vg00/lvol8    24576000 9939432 14579896   41% /var
/dev/vg00/lvol7    4096000 1507464 2568352   37% /usr

# 10  
Old 06-21-2010
Could you post the output of this command too:

Code:
bdf . | od -cb

# 11  
Old 06-21-2010
Quote:
Originally Posted by radoulov
Could you post the output of this command too:

Code:
bdf . | od -cb

OK

Code:
[root@omu /sbin]# bdf . | od -cb  
0000000   F   i   l   e   s   y   s   t   e   m
        106 151 154 145 163 171 163 164 145 155 040 040 040 040 040 040
0000020                   k   b   y   t   e   s                   u   s
        040 040 040 040 153 142 171 164 145 163 040 040 040 040 165 163
0000040   e   d               a   v   a   i   l       %   u   s   e   d
        145 144 040 040 040 141 166 141 151 154 040 045 165 163 145 144
0000060       M   o   u   n   t   e   d       o   n  \n   /   d   e   v
        040 115 157 165 156 164 145 144 040 157 156 012 057 144 145 166
0000100   /   v   g   0   0   /   l   v   o   l   8                   2
        057 166 147 060 060 057 154 166 157 154 070 040 040 040 040 062
0000120   4   5   7   6   0   0   0       9   9   3   9   4   3   2
        064 065 067 066 060 060 060 040 071 071 063 071 064 063 062 040
0000140   1   4   5   7   9   8   9   6               4   1   %       /
        061 064 065 067 071 070 071 066 040 040 040 064 061 045 040 057
0000160   v   a   r  \n
        166 141 162 012
0000164

# 12  
Old 06-21-2010
Hm,
I really don't know.

1. Let's see if the problem is in awk:

Code:
echo a b | awk '{print $2}'

2. bdf:

Code:
bdf . | while read a b;do printf '%s\n' "$a";done

# 13  
Old 06-21-2010
Quote:
Originally Posted by radoulov
Hm,
I really don't know.

1. Let's see if the problem is in awk:

Code:
echo a b | awk '{print $2}'

2. bdf:

Code:
bdf . | while read a b;do printf '%s\n' "$a";done


Code:
# echo a b | awk '{print $2}'
b

Code:
bdf . | while read a b;do printf '%s\n' "$a";done
Filesystem
/dev/vg00/lvol8


Last edited by radoulov; 06-21-2010 at 06:27 AM.. Reason: Added code tags!
# 14  
Old 06-21-2010
So awk seems to be working correctly.
Could you post all the input / output (commands and output exactly as you type them in your terminal, do not re-write them, just copy/paste).
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Equivalence classes don't work

Hello: I can't get equivalence classes to work in globs or when passing them to tr. If I understood correctly, matches e, é, è, ê, etc. But when using them with utilities like tr they don't work. Here's an example found in the POSIX standard: I decided to create the aforementioned files in... (9 Replies)
Discussion started by: Cacializ
9 Replies

2. Solaris

Open Terminal Don't work

Hi, I installed solaris 10 x86 on my local system. it was working fine. today when i started the system, it started up without any problem. when i tried to open the terminal it didn't open any terminal. Plz help me (0 Replies)
Discussion started by: malikshahid85
0 Replies

3. Programming

why printf don't work?

I use Solaris 10, I use following code: #include <signal.h> int main(void){ printf("----------testing-----------"); if(signal(SIGUSR1,sig_usr)==SIG_ERR) err_sys("can't catch SIGUSR1"); for(;;) pause(); sig_user(int signo){ ..... } when I run above code,it print nothing... (3 Replies)
Discussion started by: konvalo
3 Replies

4. Programming

why daytime don't work?

Following code is detecting solaris daytime,when I run it,I can't get any result,code is follows: #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFFSIZE 150 int main(){ ... (2 Replies)
Discussion started by: konvalo
2 Replies

5. Shell Programming and Scripting

Use variable in sed don't work.

Hi all. I have a script as below: cutmth=`TZ=CST+2160 date +%b` export cutmth echo $cutmth >> date.log sed -n "/$cutmth/$p" alert_sbdev1.log > alert_summ.log My purpose is to run through the alert_sbdev1.log and find the 1st occurence of 'Jan' and send everything after that line to... (4 Replies)
Discussion started by: ahSher
4 Replies

6. Programming

why printf() function don't go work?

I use FreeBSD,and use signal,like follows: signal(SIGHUP,sig_hup); signal(SIGIO,sig_io); when I run call following code,it can run,but I find a puzzled question,it should print some information,such as printf("execute main()") will print execute main(),but in fact,printf fuction print... (2 Replies)
Discussion started by: konvalo
2 Replies

7. UNIX for Dummies Questions & Answers

Things in tutorials that don't work.

I am thankful for this site and for the many links provided. I have been going through one of the tutorials, but as I try some things, they don't seem to work. I am wondering if there is something I need first before being able to use a tutorial (like version number (HP-UX) or how I am getting... (1 Reply)
Discussion started by: arungavali
1 Replies

8. Shell Programming and Scripting

find options don't work in script

Hi, I'm trying to write a bash script to find some files. However it seems that the find command is not behaving the same way when the script is executed as it does when executed from the command line: Script extract: #!/bin/bash ... NEW="/usr/bin/find current/applications/ -name '*jar'... (3 Replies)
Discussion started by: mattd
3 Replies

9. Post Here to Contact Site Administrators and Moderators

How come sigs don't work?

They appear to be turned on, I entered mine in. The check boxes are all checked. And yet, no sigs? (4 Replies)
Discussion started by: l008com
4 Replies
Login or Register to Ask a Question