Skip to main content

All Questions

Tagged with
0 votes
3 answers
4k views

Passing date command into a variable?

Ok so my problem is as followed, I wish to pass this :- echo $(($(date +%s%N)/1000000)) Into a variable "a" to it can be added to an array, something like this :- a=$(($(date +%s%N)/1000000)...
Shanzem's user avatar
  • 25
0 votes
1 answer
143 views

NVRAM Variable syntax

I'm trying to edit the client_customlist variable in my router with Merlin firmware, and am a bit confused with the syntax; when I export it and then look at it, most of them end with 3 >, like ...
J. Scott Elblein's user avatar
-1 votes
2 answers
344 views

Defining several variables at once (copy-paste-execute in shell)

I have a list of variables I copy-paste one by one from a file to my shell and hit Enter to execute. For example: var1="myvar1" var2="myvar2" Because in practice there are more variables, instead ...
user avatar
0 votes
1 answer
102 views

Evaluate command based on variable at bash [closed]

I am writing a small script that would choose random file for me from the directory and execute command with this chosen filename as a parameter. It is about choosing random .ovpn file and run sudo ...
zabehe's user avatar
  • 3
8 votes
1 answer
7k views

List of acceptable initial characters for a bash variable

What are the acceptable characters in a bash variable? Can someone point me to the place in the bash man page that describes the acceptable name for a bash variable? I looked and came up with a lot ...
111---'s user avatar
  • 4,645
14 votes
2 answers
9k views

How to export a large list of variables in Bash? [duplicate]

I use Bash 4.3.48(1) and I have a .sh file containing about 20 variables right under the shebang. The file contains only variables. This is the pattern: x="1" y="2" ... I need to export all these ...
Arcticooling's user avatar