Questions tagged [expansion]
428 questions
2
votes
3 answers
Avoiding expansion when looping: for x in $foo
I have to count the number of executables in a directory.
I've already figured out a different way to do it (by writing to a file and then searching the file, but that is kind of ugly).
The solution that first came to me was this (the first argument…

Kok Nikol
- 307
- 1
- 3
- 9
2
votes
3 answers
Echo woes with variable expansion
I want to append the string PROMPT_COMMAND='echo -ne \"\033]0;${USER}@${HOSTNAME}: ${PWD}\007\"' to the end of a .bashrc file across 4300 servers.
I'm having some difficulty in escaping, obviously I want the variables to not expand when being…

user2305125
- 51
- 1
- 2
2
votes
0 answers
android expansion downloader not downloading
First of all. Read all before giving down vote.
I am trying to achieve one of biggest challange for me that download OBB file through google market.
I have tested/tried almost every single code published in here and read almost every single topic…
user2322215
2
votes
1 answer
Does Expansion Files stores all files into the res/drawable folder in my phone?
I am new to android expansion files. I am not sure how it works or what to do (step-by-step build) an expansion file. As far I been reading, if I am not wrong please correct me; expansion files can be files that are stored in the Asset folder or Res…

user3128770
- 57
- 9
2
votes
2 answers
dissecting this code, explanation - check if array subset of another array
I found this example at wiki.bash-hackers.org, however it is not explained in
detail, so I was hoping maybe someone here, could put some light on this, and explain
what is happening.
I understand the first line of isSubset function, as it is taking…

branquito
- 3,864
- 5
- 35
- 60
2
votes
1 answer
How to never expand yasnippets in comments and strings
I'd like to disable YASnippet expansion (for example, if) in comments and strings, but don't find how to do that in a generic way.
On The condition system, they say how to do it for Python, but I'd like to get it working for all prog-modes at once,…

user3341592
- 1,419
- 1
- 17
- 36
2
votes
2 answers
Expand regex-like notation to multiple literals
I've got a YAML file with nodes such as:
group:
name: test
permissions:
- i.can.(create|delete)
I need to replace i.can.(create|delete) with i.can.create and i.can.delete (there are many instances).
How can I do this easily?

mikroskeem
- 37
- 1
- 9
2
votes
2 answers
Defining variable expansion for .NET objects in PowerShell
Quick background: I am fairly new to PowerShell but am a well-versed C# dev. I have mixed feelings about PowerShell so far. I love it one day, hate it the next. Just when I think I've got it figured out, I get stumped for hours trial-and-error-ing…

skataben
- 2,023
- 1
- 22
- 25
2
votes
0 answers
Double macro expansion in (AVR-)GCC
please excuse me if this question has already been answered elsewhere, but I'm not sure what to search for.
I am passing a value from a batch file, though a makefile, and to a header file, like so:
(Using AVR-GCC 4.5.2)
Batch:
make…

Paul Wilhelm
- 53
- 4
2
votes
1 answer
Java: Expanding array size, can't seem to keep all values in original locations
For my current homework, I'm trying to sort my array through a generic class as the user inserts values into its locations. When the size reads as fully loaded, the array class calls in an expansion method that increases the size of the array while…

TLM
- 245
- 2
- 7
- 13
2
votes
0 answers
How to check a file exist in obb package or not?
I am enable to get all the files from obb package but i am not able to check that a particular file exist in the package or not.
Is there any easy way to check a file exist or not without inputstream or with input stream.
public InputStream…

Jagdish
- 2,418
- 4
- 25
- 51
2
votes
1 answer
Expand aliases in tcsh
It looks like in bash it is alias-expand-line.
What is the bindkey command I can add to my .cshrc_custom file?
Sort of related: what is "^[y" referring to for a key bind? I know ^ is ctrl, but what is [?

Stuart
- 1,733
- 4
- 21
- 34
2
votes
1 answer
Wordexp behavour with &
Does anybody knows wordexp() behaviour with strings, which contained '|' or '&'.
I use wordexp(str, &res, WRDE_UNDEF), but with all strings, which contained '|' or '&' wordexp() returns WRDE_BADCHAR. I want that wordexp() doesn't report this.
E.g.…

user2033775
- 153
- 9
2
votes
1 answer
batch expansion variable cannot be used in substring replace function
im beginner, my task is something to do with renaming files in folder, first of all here is a piece of my code:-
setlocal enabledelayedexpansion
set tempLogDate=0
set g=0
for /r %targetStore% %%i IN (*2013*.*) do (
set tempLogDate=9
set…

paiseha
- 169
- 1
- 3
- 10
2
votes
1 answer
child script eval and ${@} differences
I have a parent script
while read cmd
do
nohup ./script ${cmd[@]} &>> log &
done < ~/list
that executes this child script
while true
do
eval "${CMD[@]}"
#${CMD[@]}
#./panic
done
with this list of commands
node ~/www/splash/app.js
node…

Tegra Detra
- 24,551
- 17
- 53
- 78