Read a filename while running and insert it (bash)

43 views Asked by At

I'm new to bash so I need a lot of help for probably a little thing. I'll try to explain, what I want to do or where I need help. (Excuse my english if I make mistakes)

There is a Script, which creates a numbers of .gv Files. In those .gv Files are some commands to make a graph. With "dot" I'm gonna create a picture with that.

My code now is

dot -Tsvg *.gv -o ????.svg

I need help with those ???? - In the *.gv are all .gv listed (you know what I mean I guess...) anyway, the ????'s should have the same name as the file,but there are more than one file so I don't know how to code that. It just should take the Filename while it's running.

1

There are 1 answers

0
chepner On

The -O option generates names for you, based on the input name and the output format.