The variables tag has no wiki summary.
19
votes
1answer
14k views
What is $* and $# in Linux?
What do the following environment variables in Linux mean?
What is $* (dollar sign followed by an asterisk)?
What is $# (dollar sign next to a hash mark/number sign/octothorpe/pound sign)?
6
votes
1answer
1k views
Why unload variables in Windows batch files
Is it considered necessary or good practice to unload variables used in Windows batch files?
For example in the following code, is the set myFolder= at the end necessary?
@echo off
set ...
6
votes
2answers
3k views
How to extract environment variables from system restore point, Windows 7 64-bit
Recently a (badly written) piece of software erased my PATH variable. I've been installing software for years and recovering every single entry would be cumbersome. An even more cumbersome solution ...
6
votes
2answers
1k views
How do I add “input” to my macro, to replace text in Notepad++?
I'm trying to make a macro with an 'input' pop-up dialog that synergizes with the replace feature. It should go something like: "Paste text->ask for input->replace variable in pasted text with input ...
5
votes
6answers
4k views
How do I set $ variables in unix?
For example there is a long path that I cd to very often. How do I store the path in a variable so that I can use it everytime?
For example: I wan to be able to do this
cd $path
instead of
cd ...
4
votes
1answer
6k views
Get file version from Windows command line for use in a variable?
How do grab the file version/product version from a file on the Windows 7 command line, to be used in a variable in a .bat file?
2
votes
5answers
1k views
xargs command works on ubuntu, but not mac
I have the following line of code that I use to update my personal date variable in my projects to today's current date. This line works in Ubuntu's terminal, but the Mac terminal seems to be far ...
2
votes
2answers
8k views
How do I get Vim home directory?
I wanted to set the VIMHOME variable this way (common to Windows and Linux),
let $VIMHOME=expand("%:p")."/..",
so that VIMHOME is "~/.vim" in Linux or "path/to/vimfiles" in Windows.
I put this in ...
2
votes
2answers
934 views
is there any tool that allows redirecting output to env variable in windows *.cmd script?
I mean to use it like this:
echo some data | this-tool-m-searching-for -vn myvariable
or
time | this-tool-m-searching-for -vn current_time
etc..
and then
echo %myvariable%
would produce some ...
2
votes
1answer
421 views
Linux change environmental variables without rebooting for all shells
I am using Fedora 14 and I changed my hostname in /etc/sysconfig/network and by using the hostname command. The shell prompts correctly display the new hostname. However the terminal titles still ...
2
votes
0answers
23 views
Bash auto-completion af variables adds additional white space at the end
when I perform an auto-completion of a bash variable an additional white space is added at the end.
$FO[TAB]
->
$FOO" "
I added the quotes in order to denote the white space.
The problem is ...
2
votes
0answers
37 views
VBA - Arrayformula to a range stored as array variable
I need to apply a formula array to dynamic ranges in my spreadsheets, which for a fixed size range works fine using for example:
Selection.Offset(2, 0).FormulaArray = ...
2
votes
2answers
154 views
tilde expansion fails when running “cd -” in bash
Recently I find I can't use cd - to go back to last directory sometimes. It gives the error of -bash: cd: ~/whatever_dir: No such file or directory. A closer look shows that the error only happens if ...
1
vote
4answers
763 views
Prevent users from being able to change JavaScript variables
Is it possible somehow to prevent users from being able to change JavaScript variables, trough the address bar or with programs like FireBug?
1
vote
7answers
13k views
How to get LAN ip to a variable in a Windows batch file
I'm streaming audio from my Windows 7 laptop to a sound card attached to a router. I have a little batch script to start streaming.
REM Kill any instances of vlc
taskkill /im vlc.exe
"c:\Program ...
1
vote
3answers
1k views
Highlight identical strings in vi(m)
One feature of Notepad++, which I find really useful and haven't found elsewhere, is the highlighting of other text that is identical to the one currently selected.
Is there something similar ...
1
vote
2answers
47 views
Newlines while saving variable to file - bash
I have mulitiple ip adresses in a variable.
ActiveIPs= 192.168.0.1 192.168.0.2 192.168.0.3
I want to save them to a file like this
192.168.0.1
192.168.0.2
192.168.0.3
how do i do this?
1
vote
5answers
1k views
Do I need more RAM for programming if I switch to a 64 Bit OS?
Given that today (for performance reasons?) variables are usually aligned to the "bit-width" (I wanted to use "word-width" here, but on x86 a "word" is still 16 bits right?) of the processor, would ...
1
vote
2answers
181 views
PowerShell - environment vars - differentiating between user and system vars
How can I display environment variables in PowerShell, and be able to distinguish between which ones are "user" vars and which ones are "system" vars?
1
vote
1answer
985 views
Recursively add directory to $PATH variable
Is it possible to recursively add a directory to my $PATH variable? Let's say I have a directory structure like the following:
/usr/local/bin
- /nodejs-x.x
- /redis-x.x
- /mongodb-x-x
...
1
vote
1answer
299 views
Issue with $ARCH variable
I am using a .sh script and it requires the $ARCH variable. When I type
echo $ARCH
nothing shows up on screen. How can I make this variable work ?
1
vote
2answers
424 views
How to generate a round-numbers graph in Excel?
folks!
Now, I have an Excel file with measurements I made of some color patches (I work at a Press company), with a device called spectrophotometer.
Here it is:
...
1
vote
2answers
1k views
Batch to read text files and replace quotes with variables into new file
I have customer pizza lists that I have saved into 5 separate .txt files from my database in this format:
Filename = 25Percent.TXT
"555-1211"
"555-1212"
"555-1223"
Each list is a phone number in ...
1
vote
1answer
585 views
microsoft word variables across documents
Perhaps I'm just not Googling properly or not sure of exactly what I'm looking for, but I want to have global variables across multiple Microsoft Word documents. I also want to be able to update the ...
1
vote
4answers
1k views
Color variables in photoshop?
I'm doing a lot of website design and I'm looking for a feature that would allow me to set the main colors of website in variables and use the variables in color overlays and such.
It would make ...
1
vote
1answer
73 views
Querying variables in Excel
I am looking to query some variables in Excel using a formula. I have a database that has some IDs in it that I need pulled out. The problem is that the IDs vary in length and type.
Here are some ...
1
vote
0answers
52 views
Windows: Monitor Access to Environment Variables?
Programs (on Windows) often expect certain environment variables to be set. However, the name of these environment variables is often not well documented.
E.g.: Does Eclipse expect %MINGW_HOME% or ...
1
vote
0answers
2k views
Variables List Windows 7 x64 [closed]
Are you haveing trouble with the Variable codes and does this help? When I was asking about this I could not find anything as specific other then this. I found this list and hope its helpful. I found ...
1
vote
1answer
252 views
Finding where a variable or object was declared Netbeans
In Netbeans PHP if you control + mouse1 click on an object or variable it will go to the initial declaration, if it's in the same script.
But is there any way to make it go to the initial declaration ...
0
votes
2answers
342 views
How to set the arithmetic precision in “set” batch files variables?
How do I set a precision to the SET arithmetic operation on divisions?
eg. SET /A t=3/4
But that gives result as '0' and not '0.75' ( I want at least 2 decimal places )
Or is there any other ...
0
votes
1answer
91 views
0
votes
2answers
146 views
Positive result, negative result and current balance. How do you make starting balance show current result?
I have 3 columns:
Column A shows positive result and if the result is negative then it is in a column B.
Column B shows negative result and if the result is positive then it is in a column A.
...
0
votes
2answers
178 views
Assigning values to Variable variables
I'm having troubles with a for loop, similar to below:
for VARIABLE in alpha bravo charlie; do
$VARIABLE=`sed -n '/$VARIABLE/s///gp;' $FILE`
done
$FILE might contain something like
alpha sandy
...
0
votes
2answers
46 views
IF statements in batch files
I am currently using Cruise Control to schedule 'builds' for various internal websites. I use batch files to kick off each of these 'builds' (build meaning a specific webhelp output). Let's say ...
0
votes
1answer
31 views
Add time to current-row by previous column in an excel column?
I am trying to add 20 minutes to the time in the previous column on the same row, using Excel 2003. Is this possible? I'm having trouble figuring out how to get the current row. I can just use D to ...
0
votes
1answer
74 views
zsh - variable assignment isn't working
I have this line in a function I'm adapting from a bash function into zsh function:
local info=( $(command df -P $fs | awk 'END{ print $2,$3,$5 }') )
Whenever I call it in the func I get this:
...
0
votes
3answers
118 views
loop a command with a changing variable in Windows command line
I'm a noob trying to figure out how to simplify this .bat file I'm creating (sorts out movies into another alphabetized folder) so that it will have far fewer lines. I want to get it to use loop(s) ...
0
votes
2answers
46 views
Turning paragraph count in MS word into a useable Variable for looping
I have a macro that lifts a selected amount of text from Document A, pastes it into document B, polls Word for the total number of paragraphs in document B, then does a routine to that text in ...
0
votes
1answer
73 views
Insert given variable from batch into existing xml file
Here is what I am trying to accomplish...if this can be accomplished with only batch...for now?
Instead of actually renaming the client here from the netdom statement, I want to INSERT the ...
0
votes
1answer
113 views
User input in batch file
I have a batch file that looks like this, which takes a picture of a webpage and crops it:
cd C:\users\***\Downloads\IECapt-2008-06-10
IECapt --delay=10000 --url=http://test.com/picture.swf?id=1 ...
0
votes
1answer
217 views
Path variables from system restore point, Windows 7 64-bit
Reading the answer here I don't understand this 'little button' to right of open.
Navigate to your C:\Windows\System32\config\RegBack, click the little button to the right of "Open" for "Show ...
0
votes
1answer
590 views
Variable bit rates with “-vb” and “minrate”/“maxrate” settings in FFmpeg
For rendering, the time it takes is very different.
-b 3500K -minrate 0K -maxrate 8000K takes 1hr 17min
vb=3000k takes 2.5 hours
What is vb 3000k and how is it different from -b 3500K -minrate 0K ...
0
votes
1answer
106 views
Match (highlight) invalid Hungarian notation variables syntax
We follow our own defined coding standard (Hungarian notation) as per our checklist, using Notepad++:
Check that all variables are valid according to Hungarian notation identifier naming convention, ...
0
votes
0answers
63 views
Access environment variable on both OSX and Win7
I'm fairly sure this is impossible because of syntax issues, but here goes anyway...
I'm using dropbox to sync some files that I need to access in both windows and osx. In the program I need to ...
0
votes
1answer
115 views
Getting fcron and RVM work together
I'm trying to make RVM and fcron work together. Apparently fcron does not read directly or indirectly any sort of env variables. Which makes RVM futile and scripts fail.
I have this script which ...
