Skip to main content
3 votes
1 answer
97 views

Why does this work to create an array out of the newline separated elements: declare -a themes IFS=$'\n' themes=($(plutil -extract 'Window Settings' xml1 -o - - <<< "$terminal_settings&...
Camden Narzt's user avatar
  • 2,075
0 votes
0 answers
109 views

I have shot myself in the foot a fair number of times with declare until I started to differentiate its switches that are not all equal. Some set variable attributes, but some just affect scope. So ...
Albert Camu's user avatar
1 vote
1 answer
96 views

I always considered declare equivalent to local when used within a function and declare -x equivalent to export. f() { declare -x k=1 } f echo $k The above was expected to show 1, but ...
Albert Camu's user avatar
-1 votes
2 answers
215 views

How can I reference an associative array and reassign its content from serialized string? (The eval requirement is now spelled out explicitly in the title, but this is natural when it comes to ...
Albert Camu's user avatar
0 votes
4 answers
171 views

I would like to do equivalent of name referencing from a function run in a subshell, so that arbitrary variable (e.g. associative array) is then available in the parent. Note on duplicates: I found ...
Albert Camu's user avatar
0 votes
1 answer
31 views

When I am running code DECLARE c int; BEGIN execute 'select count(1) from my_dwh.accounts' into c; raise notice c; END; I am getting error SQL Error [42601]: ERROR: syntax error at or near "...
AndroidJoker's user avatar
2 votes
2 answers
76 views

I have the following problem with XC8 compiler I had an array --> char my_array[8]; but for convenience, I want to declare the variable --> unsigned int cont_up; at the same address of ...
abimarper's user avatar
6 votes
1 answer
108 views

I am trying to manipulate associative arrays that contain $var in their names. # this does not work for i in {1..3}; do declare -A tab$i=( [nom]="john" [comment]="this does not work&...
Denis M's user avatar
  • 87
3 votes
3 answers
196 views

This is a continuation of awk gsub not replacing all instances of period in field. I have some input: $ cat ./ipv4settings.txt ipv4.gateway: 192.168.2.1 ipv4.routes: ...
aenagy's user avatar
  • 121
0 votes
1 answer
452 views

I have a old Excel file with 32-bit code. Who can turn this into 64-Bit code? Private Declare Function SetWindowPos Lib "user32" ( _ ByVal hWnd As Long, _ ...
Jens W.'s user avatar
  • 81
0 votes
0 answers
58 views

I'd need clarification about some aspects of declare -i: As stated on gnu.org: 6.5 Shell Arithmetic [...]The value of a variable is evaluated as an arithmetic expression when it is referenced, or ...
fozzybear's user avatar
  • 195
0 votes
1 answer
74 views

I have code that runs every weekday looking for the previous day, however, on Mondays, it needs to look from last Friday through Sunday. Right now, I am manually commenting in and out rows of code if ...
Nora Delgado's user avatar
2 votes
1 answer
69 views

I have a source table that I think whose table stores only one distinct period. I'm assigning that period to an int variable like below. SET NOCOUNT ON; DECLARE @tarih INT; ------------ SELECT @tarih =...
Halil's user avatar
  • 23
0 votes
1 answer
58 views

I'm trying to create an err function to be used by bash-scripts. The function is supposed to emulate BSD's errx(3) -- printing the specified message and exiting with the code specified as the first ...
Mikhail T.'s user avatar
  • 4,266
0 votes
1 answer
55 views

I need to insert a combination of set and dynamic data into a table. For example, I have a table called "Sports" and wanted to insert the set value "Soccer" to the column "...
cleanuseless's user avatar

15 30 50 per page
1
2 3 4 5
51