I have to debug a program that has errors in it as part of my assignment. However, I must first pass command line arguments in order to solve this problem.
I do:
gdb -tui InsertionSortWithErrors
which works but after that I don't know how to pass arguments.
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.
To give an example everyone knows:
Can you provide a csh complete command which allows to autocomplete any argument to ls to be either an option or a filename?
Useful documentation here.
The typical solution to this is to provide two completions: One for all -arguments and a separate one for the pathes.
Hi friends you can solve my question about make 3 shell scripts?
Quote:
Write a shell script such that, given multiple files as arguments, showing, for each of them, his name and the number of lines it contains. Try it with any file.
2.
I run the script - my_script.ksh as process with 5 long arguments
on my solaris/linux machine ( example 1 ) ,
Later I verify the process by
ps -ef | grep my_script.ksh
I don't understand way I not get the all arguments from ps -ef ? , ( see example 2 )
or maybe ps command have limitation to display a long line ?
My Bash-Script should accept arguments and options.
Moreover arguments and options should be passed to another script.
The second part I've solved:
for argument in "$@"; do
options $argument
done
another_script $ox $arguments
function options {
case "$1" in
-x) selection=1
-y) selection=2
-h|--help) help_message;;
-*) ox="$ox $1";;
*) arguments="$arguments $1";;
esa
neok wrote:Unfortunately, -Wconversion doesn't produce warnings when certain functions are given a wrong type of argument. For example, with creall() and cabsl() complex double arguments seem to be accepted.
Hello,
Please, how can i pass arguments to my lib.so ? my lib.so is written in c and i need some arguments in the code ..
LD_PRELOAD=lib.so ./program
Thank you.
What my main is supposed to do is either read from stdin using system calls. Or if file arguments are given open the file arguments. I had already coded this to read from one file argument. But now I need it to open from multiple file arguments and I am short on the logic as to how to do this.