Hi friends,
help me out
Generally If the call to fork() is executed successfully Unix will create identical copies address spaces and the execution starts from the next statement of the fork()
So, in such case
output of the following prog must be
#include<stdio.h>
{
printf("\nwelcome to");
fork();
printf("\nanswers.com");
}
O/P as per the theory:
------------
answers.com
welcome to
answers.com
but O/p coming is
welcome to
answers.com
welcome to
answers.com
A Unix filter is a command pattern that allows the output of one command to be "piped" into the input of the next command. Commands like 'ls' which list a directory are not filters since they only generate output. Filter examples are grep, sed, sort, uniq, awk. Commands in Unix are usually filters unless they only create output, like 'ls', 'vi', etc.
There is no traditional 'execute' command in Unix.
'cat' is short for concatenation; it is a Unix utility program to print the contents of 1 or more files on the standard output. It is similar to the 'type' command in Windows.
There is no standard 'format' command in Unix.
The 'CD' command is not standard for Unix. The 'cd' command, however, will change directories (folders). It is a means of navigating the Unix file system.
There is no problems with running php from the command line be it unix or windows. However the output of the command will be to stdout in the form of HTML text output. This HTML output is infact what is displayed with formatting and graphics by a web browser. In addition php run by the webbrowser and from the command line maybe at different user privileges and display differently.
In Unix, use the 'man' command.
The Unix/Linux tee command permits the forking of a data pipe in a shell script or at the command line. The teecommand does this by both writing it's standard input to a file and to it's standard output simultaneously. Most implementations of tee provide for both file overwrite/creation and file appends by command line switch options.
It is difficult to answer the question without knowing "what" you want to trim. A common command would be 'cut' to cut out columns you don't want.
The "who" command.
cat /proc/version The above answer will only work on certain systems. For most Unix systems, use the 'uname' command to get the Unix version. AIX uses the oslevel command.
I/O Redirection is used when you don't want the output to go to the standard output location, e.g., the screen. It can be very helpful in capturing information to be used in a later process. For example, if the command 'ls' is used the output goes to the screen. But if the command 'ls > ls.out' is used, then the ls command output will be redirected to a file called ls.out, which can be examined, edited, or used in a later process.