|
|
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
Люди подскажите плз. а в bash(e) есть обработка исключений ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.09.2007, 09:16:15 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
BirillAK wrote: > Люди подскажите плз. а в bash(e) есть обработка исключений ? Оно же скрипт. Есть код завершения вызванной программы, который можно проверять. Posted via ActualForum NNTP Server 1.4 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.09.2007, 10:04:37 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
Это вы по $? ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.09.2007, 10:07:36 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
А можно ли тогда перехватить последнею команду командной строки? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.09.2007, 10:11:03 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
BirillAK wrote: > А можно ли тогда перехватить последнею команду командной строки? 1) А зачем? 2) команды сохраняются в хистори, в принципе, если сохраняются часто и сразу, можно прочесть в хистори последнюю команду. Posted via ActualForum NNTP Server 1.4 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.09.2007, 15:48:29 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
Блин а как это сделать ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 07.09.2007, 02:32:14 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
BirillAK wrote: > Блин а как это сделать ? Может, вы все-таки задачу обрисуете в деталях? читайте info bash: 5.2 Bash Variables These variables are set or used by Bash, but other shells do not normally treat them specially. ..... `HISTCMD' The history number, or index in the history list, of the current command. If `HISTCMD' is unset, it loses its special properties, even if it is subsequently reset. `HISTCONTROL' A colon-separated list of values controlling how commands are saved on the history list. If the list of values includes `ignorespace', lines which begin with a space character are not saved in the history list. A value of `ignoredups' causes lines which match the previous history entry to not be saved. A value of `ignoreboth' is shorthand for `ignorespace' and `ignoredups'. A value of `erasedups' causes all previous lines matching the current line to be removed from the history list before that line is saved. Any value not in the above list is ignored. If `HISTCONTROL' is unset, or does not include a valid value, all lines read by the shell parser are saved on the history list, subject to the value of `HISTIGNORE'. The second and subsequent lines of a multi-line compound command are not tested, and are added to the history regardless of the value of `HISTCONTROL'. `HISTFILE' The name of the file to which the command history is saved. The default value is `~/.bash_history'. .... Posted via ActualForum NNTP Server 1.4 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 07.09.2007, 03:12:24 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
Мне надо что бы когда скрипт отрабатывался если кокая-нибуть команда возвращает код ошибки эта команда выводилась на экран. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 07.09.2007, 11:07:19 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
BirillAKМне надо что бы когда скрипт отрабатывался если кокая-нибуть команда возвращает код ошибки эта команда выводилась на экран. Код: plaintext 1. 2. 3. 4. 5. 6. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 07.09.2007, 13:36:15 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
Ося[quot BirillAK]Мне надо что бы когда скрипт отрабатывался если кокая-нибуть команда возвращает код ошибки эта команда выводилась на экран. Точнее вот так: Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 07.09.2007, 13:39:34 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
У меня $STDERRO нет или она пуста даже когда $? != 0 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.09.2007, 07:24:46 |
|
||
|
В bash eсть exception
|
|||
|---|---|---|---|
|
#18+
BirillAKУ меня $STDERRO нет или она пуста даже когда $? != 0 баалин! :)) Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.09.2007, 11:57:26 |
|
||
|
|

start [/forum/topic.php?fid=25&msg=34779818&tid=1487764]: |
0ms |
get settings: |
9ms |
get forum list: |
9ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
48ms |
get topic data: |
7ms |
get forum data: |
1ms |
get page messages: |
33ms |
get tp. blocked users: |
1ms |
| others: | 193ms |
| total: | 305ms |

| 0 / 0 |
