انجمنهای فارسی اوبونتو
کمک و پشتیبانی => انجمن عمومی => نویسنده: abdossamad2003 در 10 اردیبهشت 1398، 07:52 بظ
-
با سلام خدمت دوستان
به عنوان مثال می خواهم بدونم دستور if چیست؟ در شل کد man if را وارد می کنم خروجی زیر را می دهد که هیچ توضیحاتی در مورد ساختار و آپشن این دستور را نمی دهد آیا راه دیگری برای دسترسی به راهنمای دستورات فوق وجود دارد. همچنین در مورد شکل دستور در دیگر شل ها مانند csh
if(3pm) Perl Programmers Reference Guide if(3pm)
NAME
if - "use" a Perl module if a condition holds
SYNOPSIS
use if CONDITION, MODULE => ARGUMENTS;
DESCRIPTION
The construct
use if CONDITION, MODULE => ARGUMENTS;
has no effect unless "CONDITION" is true. In this case the effect is
the same as of
use MODULE ARGUMENTS;
Above "=>" provides necessary quoting of "MODULE". If not used (e.g.,
no ARGUMENTS to give), you'd better quote "MODULE" yourselves.
BUGS
The current implementation does not allow specification of the required
version of the module.
AUTHOR
Ilya Zakharevich <mailto:ilyaz@cpan.org>.
perl v5.16.3 2013-03-04 if(3pm)
-
if یک کلمه کلیدی شل هست. اجرا کنید:
help if
-
با تشکر
اگر بخواهیم راهنمای دستور if در شل csh را بدانیم چه دستوری وارد کنیم.
-
اگر بخواهیم راهنمای دستور if در شل csh را بدانیم چه دستوری وارد کنیم.
با سلام
می تونین man page خود شلتون رو مطالعه کنین :
$ man tcsh
if (expr) command
If expr (an expression, as described under Expressions) evaluates true, then command is executed. Variable substitution on command happens early, at the
same time it does for the rest of the if command. command must be a simple command, not an alias, a pipeline, a command list or a parenthesized command
list, but it may have arguments. Input/output redirection occurs even if expr is false and command is thus not executed; this is a bug.
if (expr) then
...
else if (expr2) then
...
else
...
endif If the specified expr is true then the commands to the first else are executed; otherwise if expr2 is true then the commands to the second else are exe‐
cuted, etc. Any number of else-if pairs are possible; only one endif is needed. The else part is likewise optional. (The words else and endif must ap‐
pear at the beginning of input lines; the if must appear alone on its input line or after an else.)
-
سلام
http://manpages.ubuntu.com/cgi-bin/search.py?q=if
http://manpages.ubuntu.com/manpages/disco/en/man3/if.3tcl.html
http://manpages.ubuntu.com/manpages/disco/en/man3/if.3perl.html