I
I
Issue2020-03-29 06:38:46
bash
Issue, 2020-03-29 06:38:46

How to accept arguments when running a shell script and pass them to a utility?

#!/bin/bash
trim =$1 # как убрать разрешение? . a что если *.ui? как послать вывод ls в массив и весь его обработать?
pyuic5 -x $1 -o $trim'.py' #а тут добавить .py


Interested in how to pass the first argument in the command ( main.ui - with file permission ui ) and cut .ui from it:
./build main.ui
and pass it to the pyuic5 utility, only the difference is in the file permission:
pyuic5 -x ARG(main.ui) -o main + .py

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SOTVM, 2020-03-29
@paulenot

why/why???
source=$1
write $1 immediately

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question