Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 44217  / 1 Year ago, sat, february 11, 2023, 6:11:21

I want to write shell script that takes an argument, and then applies it to files.



Specifically, I want to give a term, and then have it compile term.as with mxmlc ("mxmlc term.as"), then run term.swf with flashplayerdebugger ("flashplayerdebugger term.swf"). I'm fairly new to shell scripting - any thoughts?


More From » bash

 Answers
2

You could use something like this:



#!/bin/sh
# $0 is the script name, $1 id the first ARG, $2 is second...
NAME="$1"
mxmlc $NAME.as
flashplayerdebugger $NAME.swf

[#36140] Sunday, February 12, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
allally

Total Points: 487
Total Questions: 106
Total Answers: 110

Location: Laos
Member since Sun, Jul 3, 2022
2 Years ago
;