I want to pass the all files as single argument on linux but i am not bale to do that.
This is working
ls | sort -n | xargs -i pdftk {} cat output combinewd2.pdf
But this passes as single argument per command
but i want all in one command
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
I installed apache and php from source and got them working together a month ago. Because I'm learning both of them this term.
Now I need mysql to do more works. And I installed mysql from source just now. However I don't know how to let it work with php.
I looked around and found some topics on setting up LAMP environment.
HI guys i am new to programing world, i have found one more wish with command line argument.
I have a shell script say one.sh ,
file_name=$1 //first argument file name(two.sh)
//connect to ftp and download $file_name
bash $file_name $2 $3 $4 //2nd 3rd and 4th arguments
say $file_name "actual name is two.sh, in two.sh
.....
.....
chmod 777 script.sh
I'm having problem with taking in arguments and be able to use the content of the argument for something else.
In this case I need to take in user names and check if the person is online using finger or who
For example, my script name is getuser
in shell I type
getuser username1 username2
I want to be able to take username1 and check if he's online then take username2 and check if he's online.
I
Sometimes I need to reuse certain long arguments like paths.
If I use history search (CTRL+R), I may find some command that contains the path, but I still need to delete anything else in the old command, and then move cursor around to write the new command.
I have a shell script that accepts an argument and uses that in the script. So to run the script I type
/path/to/script argument
The problem is when trying to setup that file to run using the at utility. I have tried
at -f /path/to/script argument 17:45
at -f '/path/to/script argument' 17:45
but neither of these options work.
When I run a command like ls */*/*/*/*.jpg, I get the error
-bash: /bin/ls: Argument list too long
I know why this happens: it is because there is a kernel limit on the amount of space for arguments to a command.
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.