bdf error

I have this line in a sh script:
bdf | grep /var/opt/vgdb | tr -s " " | cut -f4,6 -d" " | awk '{print $2" "$1}' > vgdb_free_space.txt

if I run that line in the shell it works fine
but when I ran the script got this error:
add_database_files.sh: line 83: bdf: command not found

also I tried create a script with only that line:
#!/usr/bin/ksh -> also I tried with sh :s
bdf | grep /var/opt/vgdb | tr -s " " | cut -f4,6 -d" " | awk '{print $2" "$1}' > vgdb_free_space.txt

with the same error :cry:
oracle@etlx1103.eu.pg.com:SID=dummy101> sh csh.sh
csh.sh: line 2: bdf: command not found
oracle@etlx1103.eu.pg.com:SID=dummy101> ll vgdb_free_space.txt
-rw-r----- 1 oracle dba 0 May 18 00:48 vgdb_free_space.txt
/var/opt/gold/scripts
oracle@etlx1103.eu.pg.com:SID=dummy101> cat vgdb_free_space.txt
/var/opt/gold/scripts

I ran manually and it works...
oracle@etlx1103.eu.pg.com:SID=dummy101> bdf | grep /var/opt/vgdb | tr -s " " | cut -f4,6 -d" " | awk '{print $2" "$1}' > vgdb_free_space.txt
/var/opt/gold/scripts
oracle@etlx1103.eu.pg.com:SID=dummy101> cat vgdb_free_space.txt
/var/opt/vgdb01/u01 21470524
/var/opt/vgdb02/u01 25876108

does someone knows how to do that in linux?

Suggest you add the full pathname to your bdf command i.e. /usr/bin/bdf

i don't find the bdf command in linux :frowning:
is there another way to do the same output using df but in unix, so in that way instead use bdf will will use df

in linux with df work the same as in unix with bdf
linux:
oracle@etlx1103.eu.pg.com:SID=dummy101> df | grep /var/opt/vgdb
34999040 11750648 21470524 36% /var/opt/vgdb01/u01
34999040 7345064 25876108 23% /var/opt/vgdb02/u01

unix with bdf:
[bl1529@bdhp4516:/home/bl1529]
$ bdf | grep /var/opt/vgvd
220200960 28506320 190197200 13% /var/opt/vgvd02/u01
220200960 17444360 201264120 8% /var/opt/vgvd01/u01

I need the same output using the same command in both, lunix and unix.... does someone knows if there a way to do that :blush:

try

whence bdf

or

which bdf

, depending on your shell/platform...

jijij is a df command...
oracle@etlx1103.eu.pg.com:SID=dummy101> which bdf
bdf='df -k'
/bin/df
I think I'll do and if, else
one for linux and one for unix jijiji
...