Пора остановиться...

 
Гость
Тупо смотрю надпись:
code text
  1. <font size="-2" color="#808080">[b]M:\Install\LAN[/b]>man dir</font>
  2. 'man' is not recognized as an internal or external command,
  3. operable program or batch file.


и мучительно туго соображаю, где я нахожусь...
 
Гость
Balancer, 03.12.2003 17:19:54:
Тупо смотрю надпись:
code text
  1. <font size="-2" color="#808080">[b]M:\Install\LAN[/b]>man dir</font>
  2. 'man' is not recognized as an internal or external command,
  3. operable program or batch file.


и мучительно туго соображаю, где я нахожусь...
 

О! Узнаю брата Колю!
Приятно видеть, что Динозавры ещё живы!
Однако любимый IBM мог бы действитльно подсуетиться и соорудить-таки man
(тем более на dir ), раз юзер его так любит

Кстати, какой OS/2 сейчас активно пользуется продвинутыми админами?
 
Гость
Vale, 03.12.2003 18:50:52:
D:\WWW>chmod 666 file.html

 

Хых. А я последнее время цифирьками только из скриптов задаю... Вручную обычно приходится задавать что-то типа
chmod g+w -R *

Цифрами там никак
 
Гость
Alesandro, 03.12.2003 20:12:02:
Ничего, начни с:

$ whoami
 

Будешь смеяться
code text
  1. <font size="-2" color="#808080">[b]M:\usr\bin[/b]>whoami</font>
  2. Roman


 
Гость
Shurik, 03.12.2003 20:37:02:
Кстати, какой OS/2 сейчас активно пользуется продвинутыми админами?
 

вообще-то, увы, я под виндой

Кстати, аналог man там есть. Но хилый
code text
  1. <font size="-2" color="#808080">[b]M:\usr\bin[/b]>help dir</font>
  2. Displays a list of files and subdirectories in a directory.
  3.  
  4. DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
  5.   [/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]
  6.  
  7.   [drive:][path][filename]
  8.               Specifies drive, directory, and/or files to list.
  9.  
  10.   /A          Displays files with specified attributes.
  11.   attributes   D  Directories                R  Read-only files
  12.                H  Hidden files               A  Files ready for archiving
  13.                S  System files               -  Prefix meaning not
  14.   /B          Uses bare format (no heading information or summary).
  15.   /C          Display the thousand separator in file sizes.  This is the
  16.               default.  Use /-C to disable display of separator.
  17.   /D          Same as wide but files are list sorted by column.
  18.   /L          Uses lowercase.
  19.   /N          New long list format where filenames are on the far right.
  20.   /O          List by files in sorted order.
  21.   sortorder    N  By name (alphabetic)       S  By size (smallest first)
  22.                E  By extension (alphabetic)  D  By date/time (oldest first)
  23.                G  Group directories first    -  Prefix to reverse order
  24.   /P          Pauses after each screenful of information.
  25.   /Q          Display the owner of the file.
  26.   /S          Displays files in specified directory and all subdirectories.
  27.   /T          Controls which time field displayed or used for sorting
  28.   timefield   C  Creation
  29.               A  Last Access
  30.               W  Last Written
  31.   /W          Uses wide list format.
  32.   /X          This displays the short names generated for non-8dot3 file
  33.               names.  The format is that of /N with the short name inserted
  34.               before the long name. If no short name is present, blanks are
  35.               displayed in its place.
  36.   /4          Displays four-digit years
  37.  
  38. Switches may be preset in the DIRCMD environment variable.  Override
  39. preset switches by prefixing any switch with - (hyphen)--for example, /-W.
 
Гость
>вообще-то, увы, я под виндой :D

О, блин...
Ну наверное под NT-ёй

А так похоже было..
Да... идёт время.
 
Гость
Shurik, 03.12.2003 20:55:58:
Ну наверное под NT-ёй
 

Угу. XP.

Да... идёт время.
 


Угу. Вот чего один только FOR нынче умеет под XP:
code text
  1. Runs a specified command for each file in a set of files.
  2.  
  3. FOR %variable IN (set) DO command [command-parameters]
  4.  
  5.   %variable  Specifies a single letter replaceable parameter.
  6.   (set)      Specifies a set of one or more files.  Wildcards may be used.
  7.   command    Specifies the command to carry out for each file.
  8.   command-parameters
  9.              Specifies parameters or switches for the specified command.
  10.  
  11. To use the FOR command in a batch program, specify %%variable instead
  12. of %variable.  Variable names are case sensitive, so %i is different
  13. from %I.
  14.  
  15. If Command Extensions are enabled, the following additional
  16. forms of the FOR command are supported:
  17.  
  18. FOR /D %variable IN (set) DO command [command-parameters]
  19.  
  20.     If set contains wildcards, then specifies to match against directory
  21.     names instead of file names.
  22.  
  23. FOR /R [[drive:]path] %variable IN (set) DO command [command-parameters]
  24.  
  25.     Walks the directory tree rooted at [drive:]path, executing the FOR
  26.     statement in each directory of the tree.  If no directory
  27.     specification is specified after /R then the current directory is
  28.     assumed.  If set is just a single period (.) character then it
  29.     will just enumerate the directory tree.
  30.  
  31. FOR /L %variable IN (start,step,end) DO command [command-parameters]
  32.  
  33.     The set is a sequence of numbers from start to end, by step amount.
  34.     So (1,1,5) would generate the sequence 1 2 3 4 5 and (5,-1,1) would
  35.     generate the sequence (5 4 3 2 1)
  36.  
  37. FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
  38. FOR /F ["options"] %variable IN ("string") DO command [command-parameters]
  39. FOR /F ["options"] %variable IN ('command') DO command [command-parameters]
  40.  
  41.     or, if usebackq option present:
  42.  
  43. FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
  44. FOR /F ["options"] %variable IN ('string') DO command [command-parameters]
  45. FOR /F ["options"] %variable IN (`command`) DO command [command-parameters]
  46.  
  47.     filenameset is one or more file names.  Each file is opened, read
  48.     and processed before going on to the next file in filenameset.
  49.     Processing consists of reading in the file, breaking it up into
  50.     individual lines of text and then parsing each line into zero or
  51.     more tokens.  The body of the for loop is then called with the
  52.     variable value(s) set to the found token string(s).  By default, /F
  53.     passes the first blank separated token from each line of each file.
  54.     Blank lines are skipped.  You can override the default parsing
  55.     behavior by specifying the optional "options" parameter.  This
  56.     is a quoted string which contains one or more keywords to specify
  57.     different parsing options.  The keywords are:
  58.  
  59.         eol=c           - specifies an end of line comment character
  60.                           (just one)
  61.         skip=n          - specifies the number of lines to skip at the
  62.                           beginning of the file.
  63.         delims=xxx      - specifies a delimiter set.  This replaces the
  64.                           default delimiter set of space and tab.
  65.         tokens=x,y,m-n  - specifies which tokens from each line are to
  66.                           be passed to the for body for each iteration.
  67.                           This will cause additional variable names to
  68.                           be allocated.  The m-n form is a range,
  69.                           specifying the mth through the nth tokens.  If
  70.                           the last character in the tokens= string is an
  71.                           asterisk, then an additional variable is
  72.                           allocated and receives the remaining text on
  73.                           the line after the last token parsed.
  74.         usebackq        - specifies that the new semantics are in force,
  75.                           where a back quoted string is executed as a
  76.                           command and a single quoted string is a
  77.                           literal string command and allows the use of
  78.                           double quotes to quote file names in
  79.                           filenameset.
  80.  
  81.     Some examples might help:
  82.  
  83. FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do @echo %i %j %k
  84.  
  85.     would parse each line in myfile.txt, ignoring lines that begin with
  86.     a semicolon, passing the 2nd and 3rd token from each line to the for
  87.     body, with tokens delimited by commas and/or spaces.  Notice the for
  88.     body statements reference %i to get the 2nd token, %j to get the
  89.     3rd token, and %k to get all remaining tokens after the 3rd.  For
  90.     file names that contain spaces, you need to quote the filenames with
  91.     double quotes.  In order to use double quotes in this manner, you also
  92.     need to use the usebackq option, otherwise the double quotes will be
  93.     interpreted as defining a literal string to parse.
  94.  
  95.     %i is explicitly declared in the for statement and the %j and %k
  96.     are implicitly declared via the tokens= option.  You can specify up
  97.     to 26 tokens via the tokens= line, provided it does not cause an
  98.     attempt to declare a variable higher than the letter 'z' or 'Z'.
  99.     Remember, FOR variables are single-letter, case sensitive, global,
  100.     and you can't have more than 52 total active at any one time.
  101.  
  102.     You can also use the FOR /F parsing logic on an immediate string, by
  103.     making the filenameset between the parenthesis a quoted string,
  104.     using single quote characters.  It will be treated as a single line
  105.     of input from a file and parsed.
  106.  
  107.     Finally, you can use the FOR /F command to parse the output of a
  108.     command.  You do this by making the filenameset between the
  109.     parenthesis a back quoted string.  It will be treated as a command
  110.     line, which is passed to a child CMD.EXE and the output is captured
  111.     into memory and parsed as if it was a file.  So the following
  112.     example:
  113.  
  114.       FOR /F "usebackq delims==" %i IN (`set`) DO @echo %i
  115.  
  116.     would enumerate the environment variable names in the current
  117.     environment.
  118.  
  119. In addition, substitution of FOR variable references has been enhanced.
  120. You can now use the following optional syntax:
  121.  
  122.     %~I         - expands %I removing any surrounding quotes (")
  123.     %~fI        - expands %I to a fully qualified path name
  124.     %~dI        - expands %I to a drive letter only
  125.     %~pI        - expands %I to a path only
  126.     %~nI        - expands %I to a file name only
  127.     %~xI        - expands %I to a file extension only
  128.     %~sI        - expanded path contains short names only
  129.     %~aI        - expands %I to file attributes of file
  130.     %~tI        - expands %I to date/time of file
  131.     %~zI        - expands %I to size of file
  132.     %~$PATH:I   - searches the directories listed in the PATH
  133.                    environment variable and expands %I to the
  134.                    fully qualified name of the first one found.
  135.                    If the environment variable name is not
  136.                    defined or the file is not found by the
  137.                    search, then this modifier expands to the
  138.                    empty string
  139.  
  140. The modifiers can be combined to get compound results:
  141.  
  142.     %~dpI       - expands %I to a drive letter and path only
  143.     %~nxI       - expands %I to a file name and extension only
  144.     %~fsI       - expands %I to a full path name with short names only
  145.     %~dp$PATH:I - searches the directories listed in the PATH
  146.                    environment variable for %I and expands to the
  147.                    drive letter and path of the first one found.
  148.     %~ftzaI     - expands %I to a DIR like output line
  149.  
  150. In the above examples %I and PATH can be replaced by other valid
  151. values.  The %~ syntax is terminated by a valid FOR variable name.
  152. Picking upper case variable names like %I makes it more readable and
  153. avoids confusion with the modifiers, which are not case sensitive.
 
Гость
>Угу. XP.

Ну, хрен редьки не слаще


Да... идёт время.
 

>Угу. Вот чего один только FOR нынче умеет под XP:

 Ой, мать...
 
Гость
Сабж, сабж и ещё раз сабж.

Иду на форум.
Вижу стандартное сообщение, мол, "mySQL query error".
Привычно листаю отчёт вниз в надежде увидеть столь же привычное too many connections. Но вижу удивительное "mySQL error: Can't find file: ... ib_moderators.frm' ".

Ну, что делать, бывает, таблица грохнулась! Гружу phpMyAdmin, смотрю список таблиц... Гм. Все рабочие. Чешу репу. Задумываюсь... Выделяю всё и запускаю починку.

Переключаюсь снова в страницу с ошибкой. Вчитываюсь: "mySQL error: Can't find file: '.\socion\ib_moderators.frm' "... КАКОЙ В БАНЮ \socion\??? МАТЬ МОЯ, ДА ЭТО Ж МЕНЯ НА ФОРУМ socionics.org не пускают, а не на мой собственный!

Но проверку баз прервать не рискнул, пришлось дожидаться окончания

Спать мне пора. И в отпуск. Года, эдак, на три.

Вчера на апгрейде форумного движка на работе убил всю базу данных форума. Что-то в iBF совсем обленились. Раньше у них инсталляшка запрос делала "сбросить базу?". Теперь фиг. Молча, красиво, интерактивно и радостно спрашивает пароль на базу и... ага, база потом пустая!

Ещё вчера начал http://tiki.wrk.ru с CVS обновлять. Ребята! Никогда не работайте с CVS систем, которые с базами данных работают!! До вечера пытался разобраться, что они там в формате базы даных поменяли. Так и не разобрался ещё... Гм...
 
Гость
Угу. Вот чего один только FOR нынче умеет под XP:
 


Угу. Мы на нем XML-ки парсили... Медленно правда, но работает...
 

в начало страницы | новое
 
Народные приметы сегодня: В апреле девицы стараются обмануть как можно больше людей, думая, что в таком случае женихи не обманут их
Поиск
Настройки
Твиттер сайта
Статистика
Рейтинг@Mail.ru