Hello please kindly solve these doubts i have about the following scripts
Code:
Script 1
//Shell script that accepts arguments and prints them in reverse order//
echo "number of arguments"
len=$#;
while [ $len -ne 0 ]
do
eval echo \$$len
len=`expr $len - 1`
done
---------
Output
$sh test.sh a b
b
a
1.what is \$$len.what is the significance of the escape sequence
Script 2
Cod
I am new to schell scripting . My objective is to write a ksh shell script that performs following tasks: -
1. Script reads all command line arguments (arguments are file names) and checks if it contains charachters "abc" in it.
2. If it contains "abc" it will execute a binary file xyz <command line arguments>
Note: -
1. arguments can be from 1 to n.
2.
I have a shell script that takes 2 arguments.
1. The problem statement, all variables and given/known data:
Problem 1:
I need to create a shell script the takes three arguments and echo's out "There once was a ____that____who like to_____"
The arguments go where the blanks are.
Problemt 2:
-Do an LS and store the listings in a file
-Open the file in emacs.
I need to write a bash script that does the following:
If it is given fewer than two arguments, it prints an appropriate
error and exits.
Have got a homework (Shell script) which I tried my best to make it work, but in vain. Can anyone help.Question:Write a bash program named fix-permissions.sh that accepts a list of users as arguments.1- If one user or more are given as arguments, the script should reset file permissions as follows: a. Directory ~/share to 750 (if it exists). b. All regular files inside ~/share to 744. c.
I want create a script with default arguments, of manner how some commands display default arguments pressing tab button in linux
In first instance I want to catch the tab button with the command trap, but it is not a correct way since the tab button shall trapped by the shell before to execute the script and no after
the questions are,
How catch the tab button in the shell before execute t
Ok hope my vocab is right here, i'm trying to write multiple sets of arguments to another file for example:
I have a script that accepts four arguments and sends them to a another file
$write.sh it then out in
so the file receiver.txt would contain this:
Code:
it then out in
what do I need to do to execute another so it would do this
$write.sh dot spot got jot
Code:
it then out in
d
Hi all, I'm a student and a real bad student when it comes to shell scripts.
The question given is,
Shell script that accepts filenames specified as arguments and creates a shell script that contains this file as well as the code to recreate these files.