01-30-2019
It seems to be working... I will try to do some tests and I will report back to you.
Last edited by soichiro; 01-30-2019 at 04:51 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi!,
How can I check the number of arguments passed from the shell in a bash shell ? (1 Reply)
Discussion started by: DNAx86
1 Replies
2. Shell Programming and Scripting
Hello,
I have a very stupid/simple problem, but for some reason I cannot figure out...and I need your help!
I am writting a bash scrip that should be executed using "my_script X Y Z T" where X Y Z and T can be any string, but there can be any number of arguments.
I want my script to do... (4 Replies)
Discussion started by: jolecanard
4 Replies
3. Shell Programming and Scripting
This script is called fuu;
#!/bin/bash
speak() {
case $1 in
1)echo one
;;
2)echo two
;;
3)echo three
;;
esac
}
speak
exit 0
when i run fuu 2 i expect "two" like... (2 Replies)
Discussion started by: Tártaro
2 Replies
4. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Write a shell program called myenv which takes one argument. The argument should be the name of an environment variable, such as PATH HOME etc. myenv should print out the value of the variable given as the argument. If no argument is... (1 Reply)
Discussion started by: Helix
1 Replies
5. Shell Programming and Scripting
Hello, I've got this little script that gets a bunch of comics and puts them in an html file. However, when I check that the comic URL is there and that it's a new one, I get the "too many arguments" error. The script is this:
CADURL=`curl --silent http://www.cad-comic.com/cad/ | grep -o... (10 Replies)
Discussion started by: killer54291
10 Replies
6. Shell Programming and Scripting
I have trouble getting this logic to work
#!/bin/bash
function assign_var(){
while
do
read -p "$2 :" $3
done
}
assign_var '$IPADDRESS' ipaddress IPADDRESS
Basicly, i want to make sure that entry is made (i can add more sophisticated checks later), but the idea is to recycle... (11 Replies)
Discussion started by: serverchief
11 Replies
7. Shell Programming and Scripting
this script moves all the doc files to a specified directory....i have managed to put an argument but the problem im facing is puting the full path where the scripts are moving to for example i want to run the script like this below
./loo -d then path where im moving the files (i.e ./loo -d the... (2 Replies)
Discussion started by: elginmulizwa
2 Replies
8. Shell Programming and Scripting
This script moves all the doc files to a specified directory. I have managed to put an argument but the problem I am facing is putting the full path where the scripts are moving to, for example I want to run the script like this below
./loo -d then path where im moving the files (i.e ./loo -d... (3 Replies)
Discussion started by: elginmulizwa
3 Replies
9. Shell Programming and Scripting
Could someone help me with the script below?
I am trying to make a script having just one arguement as a command and then it executes the appropriate code
#!/bin/bash
if
then
echo "Available commands:"
echo "./exec.sh cmd1"
echo "./exec.sh cmd2"
elif
then
cmd1 =... (1 Reply)
Discussion started by: spiridakos
1 Replies
10. Shell Programming and Scripting
Hi,
I wanted to pass an argument to a bash script. So that the argument is used inside the awk command inside the bash script.
I know the noraml way of passing argument to a bash script as below :
sh myScript.sh abc
Inside the bash script i can use like this
myArg1=$1
wc $myArg
But... (8 Replies)
Discussion started by: shree11
8 Replies
LEARN ABOUT CENTOS
augparse
AUGPARSE(1) Augeas AUGPARSE(1)
NAME
augparse - execute an Augeas module
SYNOPSIS
augparse [OPTIONS] MODULE
DESCRIPTION
Execute an Augeas module, most commonly to evaluate the tests it contains.
OPTIONS
-I, --include=DIR
Add DIR to the module loadpath. Can be given multiple times. The directories set here are searched before any directories specified in
the AUGEAS_LENS_LIB environment variable, and before the default directory /usr/share/augeas/lenses.
-t, --trace
Print a trace of the modules that are being loaded.
--nostdinc
Do not search any of the default directories for modules. When this option is set, only directories specified explicitly with -I or
specified in AUGEAS_LENS_LIB will be searched for modules.
--notypecheck
Do not perform lens type checks. Only use this option during lens development and make sure you typecheck lenses when you are done
developing - you should never use a lens that hasn't been typechecked. This option is sometimes useful when you are working on unit
tests for a lens to speed up the time it takes to repeatedly run and fix tests.
--version
Print version information and exit.
-h Display this help and exit
EXAMPLES
To run the tests in lenses/tests/test_foo.aug and use modules from the directory lenses, run
augparse -I lenses lenses/tests/test_foo.aug
TESTS
Tests can appear as top-level forms anywhere in a module. Generally, the tests for a module lenses/foo.aug are kept in a separate file,
usually in lenses/tests/test_foo.aug.
There are two different kinds of tests that Augeas can run: get and put tests. The syntax for get tests is
test LENS get STRING = RESULT
which applies the get direction of the lens LENS to STRING and compares it with the given RESULT. RESULT can either be a tree literal, the
symbol ? to print the result of applying LENS to STRING, or the symbol * to indicate that the test should produce an exception.
The syntax for put tests is
test LENS put STRING after COMMANDS = RESULT
which first applies the get direction of the lens LENS to STRING, then applies the given COMMANDS to the resulting tree, and finally
transforms the modified tree back to a string using the put direction of LENS. The resulting string is then compared to RESULT, which can
be a string, the symbol ? to print the result of applying LENS to STRING, or the symbol * to indicate that the test should produce an
exception.
SEE ALSO
Augeas project homepage <http://www.augeas.net/>
augtool
Augeas 1.0.0 2013-02-06 AUGPARSE(1)