Write a Shell script that accepts a filename, starting and ending line numbers as arguments and displays all the lines between the given line numbers. Write a Shell script that deletes all lines containing a specified word in one or more files supplied as arguments to it. Write a Shell script that displays list of all the files in the current directory to which the user has read, Write and execute permissions.
The question does not have to be directly related to Linux and any language is fair game. Notices Welcome to LinuxQuestions.
Jan 09, · How do I write Shell Script to find factorial of a number Ans: C Program to Find Greatest of Four Number using if-elseif-else Statements. Install Terminator (Terminal emulator) in Ubuntu. Shell Script to find Greatest of Three Number using if-else Statement. Recent Post. The information on alphabetnyc.com is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. alphabetnyc.com cannot verify . Write a Shell script to find factorial of a given integer. Write a awk script to find the number of characters, words and lines in a file. Write a C Program that makes a copy of a file using standard I/O and system calls.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features.
Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions. Visit the following links: If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in?
Please visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration.
This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant.
They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.Write a shell script to accept two numbers from the command line, compare them and determine which is the larger.
It should output a suitable message (e.g. The first number, X, is greater than the 2nd number . List of Shell Programs alphabetnyc.com List of Programs The given Number is Zero=0 7.
Write a Shell Program to Find the whether the given Number is Even or Odd Write a Shell Program to Find the Factorial for a given “N” Number echo "Enter the Number" read num i=1 j=1 res=1.
The task must be implemented, and run as a single program written in shell script, with the name of the program being ‘myloc’, and stored in your home directory. Once the program is ready, you run a script (replace sn with your id; and.
A shell script is a computer program designed to be run by the Unix shell, a command line interpreter. This blog is about a shell scripting program to find the factorial of a number using recursion. We can decrease the range of numbers where we look for factors.
In the above program, our search range is from 2 to num - We could have used the range, [2, num / 2] or [2, num ** ]. The later range is based on the fact that a composite number must have a factor less than square root of that number; otherwise the number is prime.
Write a shell script program to search given number using binary search?
Shell script to check if a string is a palindrome?. Computer Programming Questions.