Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SHELL argument

Status
Not open for further replies.

2BASIC

IS-IT--Management
May 1, 2002
2
GB
Is it possible to compute the argument part of the SHELL command?

For example SHELL $A

where $A is a string variable computed elsewhere in the program eg DIR/p or DIR >>dir.txt
 
Could you rephrase that? I'm not sure of what you are asking.
Do you mean that if say:

a$ = "chkdisk"
SHELL a$

would it run chkdisk? Yes.

Please be more specific with your question.
 
And make sure you put the dollar sign AFTER the variable name, like QBASICKING did, and not before like in the example in your original question.

a$ = "DIR >>dir.txt:
SHELL a$

will append a directory listing to a file named dir.txt.
 

Spot-on response thanks, to both qbasicking and trollacious......real problem I guess is too much rust in my memory :) Bring back Fortran and punched cards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top