A variable is a storage location and an associated symbolic name (an identifier) which contains some known or unknown quantity or information

learn more… | top users | synonyms (1)

29
votes
1answer
30k 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)?
8
votes
1answer
3k 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
2k 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
7k 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
110 views

Using a system variable with spaces without truncating prematurely

I need to do something similar to this: dir > %USERNAME%.txt But what I get is that if the filename has a SPACE(" ") in it, then the name is cut there. I know that if I do this: set ...
4
votes
1answer
10k 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?
3
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 ...
3
votes
1answer
203 views

Autoit GUI, Variables not being declared on button press

I am still in the process of learning how to script my own GUIs. Koda has been a big help, I have been messing around with it, learning little bits at a time. However, I have encountered an error that ...
3
votes
0answers
171 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
4answers
1k 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
3answers
244 views

Bash script to print files that have a certain line length

I'm new to this… I need a script that receives a directory as a parameter and prints the names of files that have between 15 and 50 lines, but I don't know how use the wc output in an if-sentence: ...
2
votes
2answers
10k 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
2k 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
2k 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 ...
2
votes
1answer
4k views

Concatenating Variables within Powershell

I'm trying to concatenate two variables within Powershell to form a complete file path and file name to save a text file. I have two variables $Log_path and $Log_name I'm trying to join the two ...
2
votes
1answer
591 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
164 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
192 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
7answers
19k 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
88 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
1answer
38 views

space at the end of variable is killed on output

I'm on Ubuntu 12.04 with bash 4.2.25(1)-release. If I use #!/bin/bash echo -n 'test ' > text; echo 'test2' >> text; everything works fine and the output of text is test test2. But if I use ...
1
vote
5answers
2k 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
26 views

Bash determine whether parameter variables ($1, $2, $3, etc.) have been set

Many of the posts I just read have many answers that cover this, but I don't understand what I'm doing really; it's been hit & miss. The .sh script I'm working with: #!/bin/bash # init ...
1
vote
1answer
334 views

AutoIt update input with MsgBox line for copy/paste

I have been making alot of random scripts lately, none of which are really useful for anything but they help me to understand various things and I use them for reference quite often... anyways, one of ...
1
vote
1answer
276 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: ...
1
vote
1answer
59 views

Problems using a batch file For loop to feed .tifs into a GIS process (gdal_polygonize)

Thanks in advance for your help with this. I've been reading, experimenting, and banging my head against the wall for a couple days on this, and could really use some assistance. This is my first ...
1
vote
1answer
96 views

bash: run output of another command, with variable substitution

In bash, I often run awk programs with many preset variables. Most of the times I use the same variable names in both bash and awk, so I call awk like the following: awk -v var1="$var1" -v ...
1
vote
1answer
42 views

Extract a string inside a line without whitespaces beetween other strings

I have a txt like this: [Server] Version=3 DTBNumber=1 [DTB001] DTBName=ODBC;DRIVER=SQL Native Client;UID=MAN;PWD=bingo156;DATABASE=SHITMAN;SERVER=(local); DTBType=5 DTBnUtenti=1 DTBUtenti=002LUCA; ...
1
vote
1answer
1k 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
1k 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
2k 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
640 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
42 views

How to make variables used in read global for the script

I want to read a file with the data ordered in column. In the script that I'm writing I use the read command. The input file is made by lines like the following: XX:XX:XX:XX:XX PQRTS ...
1
vote
1answer
17 views

Unable to modify variables phpmyadmin via variables tab (Xampp)

I am quite new to phpmyadmin configuration. I had project where utf8 encoding is needed. What i'm trying to do is to change the variables text/char all into utf8. I changed, yes at that moment the ...
1
vote
0answers
46 views

atomatic (auto-re-calculate) fill series between 2 variables

I need to fill in column c series of dates or numbers in range of values in A1 and B1. Example: A1 B1 C 17/12/2013 04/12/2013 17/12/2013 ...
1
vote
0answers
176 views

Macro to copy and insert rows by variable number

I have an Excel 2003 worksheet with names and addresses, unique per row, to be used for shipping monthly magazines. Some members receive more than one copy of the magazine, which will be indicated in ...
1
vote
1answer
95 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
74 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
3k 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
508 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
3answers
602 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
2answers
18 views

confused about variables in bash

I know that variables in bash have no type, but am confused about the value they are assigned. The following simple script works fine in bash #!/bin/bash tail -n +2 /cygdrive/c/workdir\ \(newco\,\ ...
0
votes
1answer
97 views

BASH: Bracketing Parameters

Simply, whats the fundamental difference between $param and ${param} ?
0
votes
2answers
48 views

Is there any limitation on file names under Unix?

We are using crontab to schedule jobs and it was not picking the files for processing that contain [ or ] or ¿. Is there any limitation on file names or do these characters mean something in UNIX? ...
0
votes
1answer
49 views

Netbeans comment vars

How can I know about full list of comments operations for Netbeans? I saw @var @param and @return. What is the difference between /* and /** ? How can I find tutorials about Netbeans comments variable ...
0
votes
1answer
301 views

Excel 2010 VBA - Make variable hold value after file is closed

Just like the title suggests, I am looking for a way to make a variable hold its value even after the Excel 2010 file containing the VBA code is closed, and retrieve it with its last value, the next ...
0
votes
2answers
257 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
2answers
728 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. ...