Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
Сам файл list.txt содержит следующие строчки Код: plaintext 1. 2. 3. При выполнении команды Код: plaintext выводится следующее Код: plaintext Задача состоит в том, как мне выдернуть из этой строчки только значение 988 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.08.2008, 06:05 |
|
||
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
Все это нужно в батнике делать, скрипты не предлагать :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.08.2008, 06:06 |
|
||
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
> help for Some examples might help: FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do @echo %i %j %k would parse each line in myfile.txt, ignoring lines that begin with a semicolon, passing the 2nd and 3rd token from each line to the for body, with tokens delimited by commas and/or spaces. Notice the for body statements reference %i to get the 2nd token, %j to get the 3rd token, and %k to get all remaining tokens after the 3rd. For file names that contain spaces, you need to quote the filenames with double quotes. In order to use double quotes in this manner, you also need to use the usebackq option, otherwise the double quotes will be interpreted as defining a literal string to parse. %i is explicitly declared in the for statement and the %j and %k are implicitly declared via the tokens= option. You can specify up to 26 tokens via the tokens= line, provided it does not cause an attempt to declare a variable higher than the letter 'z' or 'Z'. Remember, FOR variables are single-letter, case sensitive, global, and you can't have more than 52 total active at any one time. You can also use the FOR /F parsing logic on an immediate string, by making the filenameset between the parenthesis a quoted string, using single quote characters. It will be treated as a single line of input from a file and parsed. Finally, you can use the FOR /F command to parse the output of a command. You do this by making the filenameset between the parenthesis a back quoted string. It will be treated as a command line, which is passed to a child CMD.EXE and the output is captured into memory and parsed as if it was a file. So the following example: FOR /F "usebackq delims==" %i IN (`set`) DO @echo %i would enumerate the environment variable names in the current environment. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.08.2008, 06:10 |
|
||
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
Relic Hunter > help for Some examples might help: FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do @echo %i %j %k гм, а на примере? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.08.2008, 07:37 |
|
||
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
Во вторых, мне нужно просто строку обработать а не файл. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.08.2008, 07:47 |
|
||
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
vista-rusгм, а на примере? Код: plaintext 1. 2. 3. 4. 5. Код: plaintext 1. 2. 3. Код: plaintext 1. 2. 3. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.08.2008, 18:10 |
|
||
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
СПАСИБО!!! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 08.08.2008, 04:24 |
|
||
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
Добрый день! Подскажите как можно распарсить вот такую строку Ответ от 93.158.134.203: число байт=32 время=2мс TTL=56 Необходимо получить чистый ip-адрес. Пробовал указанный пример и его разные модификации (на что мозгов хватило) и самое лучшее что у меня получилось 93.158.134.203: число байт=32 время=2мс TTL=56 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.07.2013, 21:09 |
|
||
|
Вытащить текст из найденной строки. BAT
|
|||
|---|---|---|---|
|
#18+
Еще раз перечитал внимательно справку и вот при таком условии Код: html 1. 2. 3. я получил почти то, что надо. Проблема в том, что перед ip-адресом стоят 3 пробола и в конце один. Как от них избавиться? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.07.2013, 21:19 |
|
||
|
|

start [/forum/topic.php?fid=26&msg=35472437&tid=1495477]: |
0ms |
get settings: |
7ms |
get forum list: |
16ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
36ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
47ms |
get tp. blocked users: |
1ms |
| others: | 263ms |
| total: | 387ms |

| 0 / 0 |
