Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
2answers
16 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
0answers
16 views

Duplication of windows Environment Variables

When i try to add PATH variable existing path variables are duplicating. Below command I am using to add the system variables permanently. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session ...
1
vote
1answer
35 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
0answers
12 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 ...
3
votes
1answer
103 views

Get file version from Windows command line for use in a variable?

Any idea how to 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?
4
votes
2answers
194 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 ...
2
votes
2answers
41 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 ...
2
votes
1answer
86 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 ...
0
votes
1answer
55 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 ...
0
votes
2answers
94 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
80 views

Shell: Save value in a variable, not the command

I'd like to save my current directory into a value. I do it like this dir=`dirname $0` But when I now change the directory and use this variable, it seems that the expression gets evaluated anew. ...
1
vote
2answers
79 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?
2
votes
2answers
765 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
1answer
500 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)?
1
vote
4answers
3k 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
1answer
349 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 ...
0
votes
4answers
273 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?
2
votes
5answers
580 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 ...
0
votes
3answers
417 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
4k 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 ...
3
votes
6answers
419 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 ...
0
votes
1answer
65 views

BASH: Bracketing Parameters

Simply, whats the fundamental difference between $param and ${param} ?
1
vote
4answers
500 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 ...
0
votes
5answers
601 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 ...