Tagged Questions

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)

2
votes
2answers
35 views

Store command output in variable

If I do z='ls' and then echo $z it will print the directory I listed, but without newlines or formatting. I assume lack of colored formatting is impossible to get around, but would it be possible to ...
1
vote
1answer
26 views

Powershell search-string inside a variable (not text file)

I am trying to search for a string called "Hostname" from a variable "$a" which stores the output of "systeminfo" command but ran into issues. I am using "system-info" to gather a bigger set of data. ...
0
votes
1answer
25 views

Where do the variables of a new BASH shell come from?

I am puzzled as about how environment variables work. From what I am aware, for a new process to have some environment variables, its parent must have issued export. But what about all the variables ...
1
vote
1answer
14 views

Same Header Infomation on Different size pages in the same document

I need to be able to have the data entered in the first page header be shown on all subsequent pages. This is easy if all the pages are all the same size. How can this be achived if the pages are of ...
0
votes
1answer
38 views

NSIS installer - change path based on dialog

Im trying to create an installer using NSIS, using "installer based on zip file". I'd like to create a dialog box at the beginning of install that gives the user 2 choices (32, 64), then depending ...
0
votes
1answer
25 views

Capture a GUID that is part of key name from registry and turn it into variable

Im trying to capture a specific GUID from registry that is unique (naturally) and changing from time to time. Then turn it into variable that i can use in REG ADD operation (i know that part). The ...
3
votes
2answers
97 views

In bash, how I define a “command scope” variable?

I'm reading this book on the bash architecture and one of the bash maintainers says: There are different variable scopes for shell function calls and temporary scopes for variables set by ...
0
votes
3answers
25 views

Replacing part of a path name with search variable?

I'm not sure if I have used the right expression in the question, but the context totally slips my mind. I am trying to write a script to go to a student folder, depending on who is logged in, but I ...
1
vote
4answers
69 views

How do I test whether a variable has multiple non-blank lines in bash?

Say I have two variables in bash: MULTILINE="I have more than one line" SINGLE_LINE="I only have one line " I want to detect when a variable actually contains more than one line of text, ...
0
votes
0answers
9 views

Start a service from inside a service and export command

I am making a service call from another service and trying to export a variable to the new service. I am not quite sure if the new service to start is a child of the former service. I read that export ...
-1
votes
1answer
37 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?
0
votes
1answer
64 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
116 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
23 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
11 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
50 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
2answers
25 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\,\ ...
1
vote
1answer
44 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
1answer
80 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
110 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
140 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
310 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 ...
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
0answers
45 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
0answers
51 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
525 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 ...
1
vote
1answer
155 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 ...
0
votes
1answer
78 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 ...
1
vote
1answer
63 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; ...
4
votes
2answers
16k 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
6k 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
682 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
45 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
1answer
429 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
256 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
2answers
731 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
1answer
475 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 ...
2
votes
3answers
361 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
2k 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 ...
1
vote
0answers
273 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
345 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
220 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
301 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
747 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
91 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
231 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
57 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
202 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
391 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
3k 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 ...