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)

-4
votes
0answers
37 views

Set command havs no effect inside IF [duplicate]

IF "%3"=="" ( set FOO=wtf echo FOO=%FOO% The FOO is empty in spite of assignment. What is up and how do I fix it? Well, there is a right title but I cannot read through the megatons of the ...
0
votes
3answers
604 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 ...
-1
votes
1answer
28 views

I don't see 'path' under environment vaariables

I am trying to set path for Python but I have no 'path' under environment variables. Below is a link for the original issue as well a screen shot. How can I fix this?
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 ...
0
votes
1answer
25 views

Python path is not recognized after adding a new variable under environment variables, picture provided

'python' is not recognized as an internal or external command, operable program or batch file. My Python folder is directly in C:\python34..... Please look at the picture.... ...
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 ...
0
votes
0answers
17 views

How can I select a column using a variable?

I am using the formula =LOOKUP(A5,Rota!A56:A81,Rota!I56:I81), where; A5 holds a name Rota!A56:A81 holds a list of staff names I56:I81 is the number of hours worked by that person This is repeated ...
0
votes
0answers
7 views

Trying to find dbus session, doesent work

Trying to use notify-send with cron, it needs dbus, what im i doing wrong? var= $(set | grep '^DBUS_SESSION_BUS_ADDRESS=') export DBUS_SESSION_BUS_ADDRESS=$var #!/bin/sh { ...
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 ...
0
votes
2answers
466 views

Need to set mailx variable to specify the From address

Running Oracle Linux 5.8 (which is just re-branded RedHat EL 5.8) I must change the From address. But we have scripts that use mailx which cannot be re-written to use any extra flags, so I'd like to ...
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
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
47 views

Write a .bat file to select a certain portion of an output of a batch command into a batch file variable

If I run the following command on my windows 7 system (where cable is the name of my network adapter) netsh interface ip show ipaddresses cable I get the following result: Address 10.17.179.17 ...
0
votes
1answer
50 views

Append an index number to a variable name in bash?

I am trying to loop through numbered variables but am having a hard time appending the loop index number to the base variable name. Code follows, using a 2-iteration example: #ENTER TOTAL NUMBER OF ...
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 ...
0
votes
1answer
78 views

How do I use variables in bash to output to a file and to a mail body with sendmail

I've been working on this little script and it's nearly at a point that I can start using it. The idea is to automate WordPress installs via Plesk. I've got Plesk setup with a cronjob to download ...
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 ...
-1
votes
1answer
37 views

Limitation in number of entries in System variables Windows 7 64-bit

i've encountered that there might be a limit of how many entries you can have in System Variables in Environment Variables, can someone verify my suspicion? I'm not talking about how many characters ...
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)?
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 ...
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 ...
0
votes
0answers
32 views

Microsoft Excel, setting variable reference

I am converting a macro that used a set date range to only extract the products needed within that date range. However, as certain products have different availabilities I would like to extract all ...
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
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 ...
0
votes
1answer
257 views

Batch to prompt for folder name and command, redirect to TXT file

What I'm trying to accomplish, is to have the batch file prompt the user to input their specific folder on our team's directory, and then prompt for a specific command to be used, and redirected to a ...
0
votes
1answer
4k 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
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 ...
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 ...
0
votes
1answer
169 views

How do I do the manual set up of MinGW in my computer?

My problem: I have been trying to install MinGW manually but I cannot find the PATH it says that I needed to modify. MinGW site says: 1. Right-click on your "My Computer" icon and select ...
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; ...
0
votes
1answer
3k views

Batch to extract a word from a string inside a text file

I have a database.txt file with this content: 40001 16 DATAMAN Jimbo WS2 I want to extract the third word, as delimited by whitespace ("DATAMAN" ...
0
votes
1answer
306 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 ...
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 ...
0
votes
0answers
27 views

How to use the Integer i.e. currentregion's row from the macro in a cell's formula

How do I use the row from the current cell, in another Cell's Formula on another sheet? I created this Macro, but don't know how to use the Integer from the macro in a cell's formula. In a macro I ...
1
vote
1answer
335 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 ...
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 ...
0
votes
0answers
50 views

Add random variable to end of email subject in msmtp

I use msmtp to send messages to twitter upon task completions, but twitter filters them if I send the same tweet in too short of a time span. My question is how do I add a random variable to the end ...
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: ...
0
votes
2answers
1k views

Batch command to delete files from file list [duplicate]

This code works fine. it deletes files from a file list: For /f %%a in (file.lst) do del %%a But why is the below one not working? It deletes the .lst file itself: if exist file.lst ( set ...
0
votes
1answer
187 views

Using SETX to configure a pc's LM_LICENSE_FILE environment variable

Various Windows applications such as Matlab, Altair, Nastran etc use license servers, which require a system environment variable - LM_LICENSE_FILE, to be updated which would take a value along the ...
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 ...
0
votes
2answers
259 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 ...
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 ...
0
votes
2answers
246 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
603 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 ...
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?
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 = ...
0
votes
1answer
53 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
168 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 ...
1
vote
1answer
279 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: ...