As the title says I need help with a bash script that has to generate a string given two numeric variables. That string will be used to generate a file name, but when I test the name generation code it yields nothing
The script is the code that follows
# !usr/bin
set nombre
declare -a i
declare -a j
set $i 1
set $j 2
set nombre "$i\_$j.txt"
echo $i
echo $j
Here is what it yields:
entropy@3PY:~$ ./test4
As you can see it yields nothing while it should yield
1
2
thanks in advance
#!/bin/bashor#!/usr/bin/env bashas your shebang, or#!/bin/shif you really wanted to write POSIX sh instead of bash (despite the question being tagged for the latter).#!/usr/binisn't a valid shebang, nor is# !usr/bin, and a script starting with either of those won't run correctly when started from something other than a shell.