The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
18 views

How to print index in a 'for-loop' being executed in remote host through SSH?

I want to ssh into a remote host, and then execute a for loop that goes through sequence of numbers to control number of different nodes. ssh user@host /bin/bash << EOF for i in {1..10} do echo ...
0
votes
1answer
9 views

Word 2010: Loop in Active Table Cell

UPDATE: I am now working from the top of the Active Cell with this code: Selection.EndKey Unit:=wdLine Selection.TypeText Text:=", " Selection.Delete Unit:=wdCharacter, Count:=1 I need it to loop ...
0
votes
1answer
19 views

batch: wmic difficulty in FOR loop

I'm trying to learn to write batch files so I can be more useful at work, but I'm having some difficulty with wmic inside a for loop. (even if there is a better way to do this with PowerShell or ...
0
votes
1answer
61 views

Copy from sheet2 to sheet1 based on if values match

The goal of this code is to iterate through a column in sheet1 and check to see if each value matches that of values in a row in sheet2. If the value matches, copy 5 rows of information from sheet2 ...
3
votes
2answers
32 views

How to work around Bash for loop not exiting when a subcommand errors?

I have a for-loop in a shell script a la: #!/bin/bash set -u set -e for l in sh rb py php java cs; do (cd $l; ./run-tests.sh) done The intent is to have the for-loop die in a fire when any one of ...
0
votes
1answer
69 views

Need help creating a .bat file to execute SAS jobs

Using Windows 7, I need a .bat file that will execute files in a folder whenever I put them in there. for example I want it to execute files with a .sas suffix and then rename them once executed. I ...
0
votes
1answer
67 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
92 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
votes
1answer
44 views

Pass a variable in skip of for loop [closed]

Can we pass a variable in for loop as in below example: @ECHO off SETLOCAL ENABLEDELAYEDEXPANSION set /A counter=6 echo !counter! for /f "skip=!counter! tokens=1-18 delims=]" %%A in ...
2
votes
1answer
49 views

For command not processing lines from a file

I dumped all the physical network GUIDs to a file via: wmic nic where "PhysicalAdapter = 'TRUE'" get GUID > networkAdapterGUIDs.txt When I try to read the file and echo out its contents nothing ...
1
vote
2answers
55 views

why does this work in a shell for loop but not by itself

why does this work for X in A* ; do cp $X/output.txt output/$X.txt ; done but not this cp A*/output.txt output/A*.txt For copying the output.txt file from multiple folders called A1, A2, A3, ...