Sponsored Content
Full Discussion: BT-Basic Read File
Operating Systems HP-UX BT-Basic Read File Post 302169416 by slapshot on Thursday 21st of February 2008 08:11:17 AM
Old 02-21-2008
Tools BT-Basic Read File

I'm a real newby to BT-Basic and I have this task at hand.

I have to input a user name and password in a BT-Basic program. I would like to compare this input to a name list in root and if found, continue. If not loop back to the input.

I have this:

Oper_Id_Prompt$ = "Enter ID"
print using """"&Oper_Id_Prompt$&""",#"
input "",Oper$

Oper_Pass_Prompt$ = "Enter Password"
print using """"&Oper_Pass_Prompt$&""",#"
input "",Pass$

I also have a file called "users" in root with lines of text:
user1|password1
user2|password2
user3|password3
user4|password4

I would like to read this file for a legal user and password and continue if found, loop back to Oper_Id_Prompt$ = "Enter ID" if not found.

I'm not sure how to open/close/read files and build arrays in this BT-Basic.

Can one of you gurus give me a "snippet" or some advise?

Thanks
Tim
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

basic unix file command!

Hi there, I am looking to create a single file called outputa.txt, which will show the contents of my directorya and its sub directories, and all file and directory permissions. What command would be used for this? Cheers Kev (2 Replies)
Discussion started by: kev112
2 Replies

2. Programming

Cannot read a file with read(fd, buffer, buffersize) function

# include <stdio.h> # include <fcntl.h> # include <stdlib.h> # include <sys/stat.h> int main(int argc, char *argv) { int fRead, fPadded, padVal; int btRead; int BUFFSIZE = 512; char buff; if (argc != 4) { printf ("Please provide all of the... (3 Replies)
Discussion started by: naranja18she
3 Replies

3. Shell Programming and Scripting

cron job issue..i hav read the basic threads already...

hi friends well m facing a different sort of issue in my cron. i hav set job like this 30 09 * * 1 /bin/backup14M 01 14 * * 1 /bin/backup14N 20 18 * * 1 /bin/backup14E that is for every Monday at three different times. but, first job executes well, later ones do not. I checked my... (13 Replies)
Discussion started by: oracle.test2
13 Replies

4. UNIX for Dummies Questions & Answers

Basic file processing question

I have a csv file with 3 columns. Column 1 is a date "mm/dd/yyyy", column 2 is a dollar amount (e.g. "100.00") & column 3 in a description of where the transaction took place (e.g. "CHECK CRD PURCHASE 10/07 ACME INC USA") so... "10/01/2009","100.00", "CHECK CRD PURCHASE 10/07 ACME INC USA" I... (1 Reply)
Discussion started by: watingo
1 Replies

5. UNIX for Dummies Questions & Answers

Basic Script to check for a file

Hello, Little new to unix scripting. I need to create a script that will do the following. Check in a directory for a file that will be present between 19:00 and 23:00. If the file is present a e-mail then needs to be sent to myself confirming. I did write something basic...as below... ... (3 Replies)
Discussion started by: Thundercat1
3 Replies

6. UNIX for Dummies Questions & Answers

When reading a csv file, counter to read 20 lines and wait for minute then read next 20 till end

Hello All, i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file. Any inputs are appreciated ... (3 Replies)
Discussion started by: victor.s
3 Replies

7. Shell Programming and Scripting

Read from file and execute the read command

Hi, I am facing issues with the below: I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,). Now i want to read this command from file and execute it. So my code below is : Contents in the lookup.lkp file is : c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
Discussion started by: vital_parsley
7 Replies

8. Shell Programming and Scripting

Log file analyzer, super basic sh file

Hello! I have a small shell project that is due next week, that I'd appreciate some help with. task: Write a shell program that can analyze at least 2 types of log files and print them in an easily readable way. Make it so that you can switch between log file types. The two file types should be... (1 Reply)
Discussion started by: malfiory
1 Replies
ODFFINDBASIC(1p)					User Contributed Perl Documentation					  ODFFINDBASIC(1p)

NAME
odffindbasic - Basic macro removal from OpenOffice.org files USAGE
odffindbasic [options] <sourcefile> [<targetfile>] DESCRIPTION
A simple command that allows the user to detect, export or remove the Basic modules from a regular OpenOffice.org file. Without option, the program displays the number of Basic modules found in the file. The 2nd filename is used in combination with the --delete option. OPTIONS
--nocount Prevents the program from displaying the number of Basic modules found. --delete -d If this option is set, the Basic modules are physically deleted. The file manifest is updated accordingly. However, the document content remains unchanged, even if it contains some references to the deleted macros. The code is removed (so the macros are no longer executable). If a target file name is provided as a 2nd argument, the changes are saved in it and the source file remains unchanged. --export -e Exports the macros. Every Basic module is extracted and converted to a flat Basic source file in the current directory. The name of each created file is constructed according to the corresponding path in the ODF file, and its suffix is "bas". --list -l The Basic modules are listed through the standard output. --verbose Some information messages are printed. perl v5.14.2 2008-05-04 ODFFINDBASIC(1p)
All times are GMT -4. The time now is 12:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy