How to set the output file for edsbr?

IP and Voice over IP
Post Reply
krutarthap

How to set the output file for edsbr?

Post by krutarthap »

Hi,

I want to use edsbr to generate a file with a list of extensions and phone names. I use

edsbr
clear
dir
name
go file

but the file being generated is always /tmpd/edsbr.out. Can i change the name of this file, to e.g. /tmpd/myfile.out?
User avatar
Eliott
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 640
Joined: 10 Feb 2010 03:43

Re: How to set the output file for edsbr?

Post by Eliott »

mv /tmpd/edsbr.out /tmpd/myfile.out
Other way is not possible as edsbr calls just /usr2/oneshot/mtcl/edmcs with fixed options.
Or use:
cdmao;echo "SELECT Mcdu,S_Name,F_Name,UTF8_S_Name,UTF8_F_Name FROM PHONEB;"|cuser|grep "\-\-" |grep -v Mcdu |cut -c5- >/tmpd/myfile.out
krutarthap

Re: How to set the output file for edsbr?

Post by krutarthap »

Thanks a lot! The second command is very useful, it is much simpler than edsbr.

Is the database structure (tables & fields) documented anywhere? I think there may be other useful queries that we don't know about yet.
User avatar
Eliott
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 640
Joined: 10 Feb 2010 03:43

Re: How to set the output file for edsbr?

Post by Eliott »

krutarthap wrote:Is the database structure (tables & fields) documented anywhere?
I think so but have never seen it. It's R&D internal and I'm not an ALU developer.
emning

Re: How to set the output file for edsbr?

Post by emning »

krutarthap wrote:Is the database structure (tables & fields) documented anywhere? I think there may be other useful queries that we don't know about yet.
I've been working on a simple extension that required this as well, and found the table names by looking at the files in /DHS3data/mao.

In other words, this should give you a list of table names:

Code: Select all

cdmao
for x in $(ls *.idx); do echo ${x%%M.*}; done
From there a simple "select * from" on a table will give you field names and contents.
User avatar
Eliott
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 640
Joined: 10 Feb 2010 03:43

Re: How to set the output file for edsbr?

Post by Eliott »

emning wrote:
krutarthap wrote:Is the database structure (tables & fields) documented anywhere? I think there may be other useful queries that we don't know about yet.
I've been working on a simple extension that required this as well, and found the table names by looking at the files in /DHS3data/mao.

In other words, this should give you a list of table names:

Code: Select all

cdmao
for x in $(ls *.idx); do echo ${x%%M.*}; done
From there a simple "select * from" on a table will give you field names and contents.
Easier: cat /usr2/fab/tbl2obj.ref
Post Reply

Return to “IP / VoIP”