UNIX Reference Manual

PDF-файл UNIX Reference Manual Системное программное обеспечение (СПО) (37178): Другое - 3 семестрUNIX Reference Manual: Системное программное обеспечение (СПО) - PDF (37178) - СтудИзба2019-05-08СтудИзба

Описание файла

PDF-файл из архива "UNIX Reference Manual", который расположен в категории "". Всё это находится в предмете "системное программное обеспечение (спо)" из 3 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .

Просмотр PDF-файла онлайн

Текст из PDF

CSH ( 1 )UNIX Reference ManualCSH ( 1 )NAMEcsh − a shell (command interpreter) with C-like syntaxSYNOPSIScsh [ −bcefinstvVxX] [arg ... ]csh [ −l]DESCRIPTIONThe csh is a command language interpreter incorporating a history mechanism (see HistorySubstitutions), job control facilities (see Jobs), interactive file name and user name completion (seeFile Name Completion), and a C-like syntax. It is used both as an interactive login shell and a shellscript command processor.Argument list processingIf the first argument (argument 0) to the shell is ‘ −’, then this is a login shell. A login shell also can be specified by invoking the shell with the ‘ −l’ flag as the only argument.The rest of the flag arguments are interpreted as follows:−bThis flag forces a ‘‘break’’ from option processing, causing any further shell arguments to be treatedas non-option arguments.

The remaining arguments will not be interpreted as shell options. Thismay be used to pass options to a shell script without confusion or possible subterfuge. The shell willnot run a set-user ID script without this option.−cCommands are read from the (single) following argument which must be present. Any remaining arguments are placed in argv.−eThe shell exits if any invoked command terminates abnormally or yields a non-zero exit status.−fThe shell will start faster, because it will neither search for nor execute commands from the file.cshrc in the invoker’s home directory.−iThe shell is interactive and prompts for its top-level input, even if it appears not to be a terminal.Shells are interactive without this option if their inputs and outputs are terminals.−lThe shell is a login shell (only applicable if −l is the only flag specified).−nCommands are parsed, but not executed.

This aids in syntactic checking of shell scripts.−sCommand input is taken from the standard input.−tA single line of input is read and executed. A ‘\’ may be used to escape the newline at the end ofthis line and continue onto another line.−vCauses the verbose variable to be set, with the effect that command input is echoed after historysubstitution.−xCauses the echo variable to be set, so that commands are echoed immediately before execution.−VCauses the verbose variable to be set even before .cshrc is executed.−XIs to −x as −V is to −v.After processing of flag arguments, if arguments remain but none of the −c, −i, −s, or −t options weregiven, the first argument is taken as the name of a file of commands to be executed. The shell opens this file,and saves its name for possible resubstitution by ‘$0’.

Since many systems use either the standard version 6or version 7 shells whose shell scripts are not compatible with this shell, the shell will execute such a ‘standard’ shell if the first character of a script is not a ‘#’, i.e., if the script does not start with a comment. Re-4th Berkeley DistributionJanuary 21, 19941CSH ( 1 )UNIX Reference ManualCSH ( 1 )maining arguments initialize the variable argv.An instance of csh begins by executing commands from the file /etc/csh.cshrc and, if this is a loginshell, /etc/csh.login. It then executes commands from .cshrc in the home directory of the invoker,and, if this is a login shell, the file .login in the same location.

It is typical for users on crt’s to put thecommand ‘‘stty crt’’ in their .login file, and to also invoke tset(1) there.In the normal case, the shell will begin reading commands from the terminal, prompting with ‘% ’. Processing of arguments and the use of the shell to process files containing command scripts will be described later.The shell repeatedly performs the following actions: a line of command input is read and broken intowords. This sequence of words is placed on the command history list and parsed.

Finally each command inthe current line is executed.When a login shell terminates it executes commands from the files .logout in the user’s home directoryand /etc/csh.logout.Lexical structureThe shell splits input lines into words at blanks and tabs with the following exceptions.

The characters ‘&’‘|’ ‘;’ ‘<’ ‘>’ ‘(’ ‘)’ form separate words. If doubled in ‘&&’, ‘||’, ‘<<’ or ‘>>’ these pairs form single words.These parser metacharacters may be made part of other words, or prevented their special meaning, by preceding them with ‘\’. A newline preceded by a ‘\’ is equivalent to a blank.Strings enclosed in matched pairs of quotations, ‘’ ’, ‘`’ or ‘"’, form parts of a word; metacharacters in thesestrings, including blanks and tabs, do not form separate words. These quotations have semantics to be described later. Within pairs of ‘´’ or ‘"’ characters, a newline preceded by a ‘\’ gives a true newline character.When the shell’s input is not a terminal, the character ‘#’ introduces a comment that continues to the end ofthe input line.

It is prevented this special meaning when preceded by ‘\’ and in quotations using ‘`’, ‘´’, and‘"’.CommandsA simple command is a sequence of words, the first of which specifies the command to be executed. A simple command or a sequence of simple commands separated by ‘|’ characters forms a pipeline. The output ofeach command in a pipeline is connected to the input of the next. Sequences of pipelines may be separatedby ‘;’, and are then executed sequentially. A sequence of pipelines may be executed without immediatelywaiting for it to terminate by following it with an ‘&’.Any of the above may be placed in ‘(’ ‘)’ to form a simple command (that may be a component of a pipeline,etc.). It is also possible to separate pipelines with ‘||’ or ‘&&’ showing, as in the C language, that the secondis to be executed only if the first fails or succeeds respectively.

(See Expressions.)JobsThe shell associates a job with each pipeline. It keeps a table of current jobs, printed by the jobs command, and assigns them small integer numbers. When a job is started asynchronously with ‘&’, the shellprints a line that looks like:[1] 1234showing that the job which was started asynchronously was job number 1 and had one (top-level) process,whose process id was 1234.If you are running a job and wish to do something else you may hit the key ˆZ (control-Z) which sends aSTOP signal to the current job.

The shell will then normally show that the job has been ‘Stopped’, and printanother prompt. You can then manipulate the state of this job, putting it in the background with the bg command, or run some other commands and eventually bring the job back into the foreground with theforeground command fg. A ˆZ takes effect immediately and is like an interrupt in that pending output and4th Berkeley DistributionJanuary 21, 19942CSH ( 1 )UNIX Reference ManualCSH ( 1 )unread input are discarded when it is typed. There is another special key ˆY that does not generate a STOPsignal until a program attempts to read(2) it. This request can usefully be typed ahead when you have prepared some commands for a job that you wish to stop after it has read them.A job being run in the background will stop if it tries to read from the terminal.

Background jobs are normally allowed to produce output, but this can be disabled by giving the command ‘‘stty tostop’’. If you setthis tty option, then background jobs will stop when they try to produce output like they do when they try toread input.There are several ways to refer to jobs in the shell. The character ‘%’ introduces a job name. If you wish torefer to job number 1, you can name it as ‘%1’.

Just naming a job brings it to the foreground; thus ‘%1’ is asynonym for ‘fg %1’, bringing job number 1 back into the foreground. Similarly saying ‘%1 &’ resumes jobnumber 1 in the background. Jobs can also be named by prefixes of the string typed in to start them, if theseprefixes are unambiguous, thus ‘%ex’ would normally restart a suspended ex(1) job, if there were only onesuspended job whose name began with the string ‘ex’. It is also possible to say ‘%?string’ which specifies ajob whose text contains string, if there is only one such job.The shell maintains a notion of the current and previous jobs.

In output about jobs, the current job is markedwith a ‘+’ and the previous job with a ‘−’. The abbreviation ‘%+’ refers to the current job and ‘%−’ refers tothe previous job. For close analogy with the syntax of the history mechanism (described below), ‘%%’ isalso a synonym for the current job.The job control mechanism requires that the stty(1) option new be set.

It is an artifact from a new implementation of the tty driver that allows generation of interrupt characters from the keyboard to tell jobs tostop. See stty(1) for details on setting options in the new tty driver.Status reportingThis shell learns immediately whenever a process changes state. It normally informs you whenever a job becomes blocked so that no further progress is possible, but only just before it prints a prompt.

This is done sothat it does not otherwise disturb your work. If, however, you set the shell variable notify, the shell willnotify you immediately of changes of status in background jobs. There is also a shell command notifythat marks a single process so that its status changes will be immediately reported.

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5259
Авторов
на СтудИзбе
421
Средний доход
с одного платного файла
Обучение Подробнее