7
First variable is overwrited by the second variable in shell scriptview story

http://stackoverflow.com – For example , I have two shell script file name main.sh and child.sh and one ini file name param.ini. In main.sh #!/bin/bash ./usr/child.sh echo $param // show Jame var=${param}How are you echo $var // output show only How are you and Jame is overwrited.The output should Jame How are you In child.sh #!/bin/bash ./usr/param.ini param=$name echo $param // show Jame In param.ini name=Jame (HowTos)

7
What does "ulimit -s unlimited" do?view story

http://stackoverflow.com – There are understandably many related questions on stack allocation What and where are the stack and heap? Why is there a limit on the stack size? Size of stack and heap memory However on various *nix machines I can issue the bash command ulimit -s unlimited or the csh command set stacksize unlimited How does this change how programs are executed? (HowTos)

7
$BASHPID And $$ differ in some casesview story

http://unix.stackexchange.com – I'm reading "BASH pocket guide of Oreilly". It said: The process ID of the current Bash process. In some cases, this can differ from $$. Above explanation , explained $BASHPID variable. Question: which cases? (HowTos)

7
Is there a utility to show total up/download quantity of a processview story

http://askubuntu.com – In bash I can run time $(curl -L ...|bash) to find out the total time this script takes. Is there a way to get similar total information about the up/download traffic it generated? Note that nethogs does not do what I need - it shows the traffic rates from time to time. I'd like the cummulative total of the traffic in/out. (HowTos)

7
Find functions, commands, and builtinsview story

http://unix.stackexchange.com – Suppose I have the following bash code: !#/bin/bash function print_echo (){ echo "This is print_echo Function" $1; } find ./ -iname "*" -exec print_echo {} \; For each -exec command i get the following error: find: `print_echo': No such file or directory NOTE: Before it , i tested it for a critical program , and solved my program with another algorithm but it's a question: Why find comm (HowTos)

7
Run bash as a child process in C having same effect as do ssh hasview story

http://forums.fedoraforum.org – I want to run bash as child process of my C program. Few conditions 1) My program will handle both STDIN and STDOUT of bash. 2) No care about practical use. I have done it but it does not looks like bash. Here is my code Code: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> #include <sys/wait.h> // for tunneling (HowTos)

7
How to use an optional argument?view story

http://unix.stackexchange.com – I'm writing this script to work as a fast draft. It opens my text editor with date and time, so I can insert some draft text to save quickly. 1. At first I'd like to append the date and time at the beginning of the file instead of at the end, as >> $file does. But I guess that it is not so easy, so this is not my priority. 2. I defined an argument $1. (HowTos)

7
PHP shell_exec gives gphoto2 error messageview story

http://stackoverflow.com – I successfully managed to run .sh files with PHP shell_exec from a browser on a networked computer, (like "hello world") but when I try to execute a gphoto2 command within the .sh file, it runs the .sh, but gphoto2, instead of taking a picture, it gives me the error message: For debugging messages, please use the --debug option. Debugging messages may help finding a solution to your problem. (HowTos)

7
Pausing rsync via bash script?view story

http://unix.stackexchange.com – Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks from overheating or network throttling. I am currently using a Windows batch file to start a Linux bash script via cygwin to do this. (HowTos)

7
command not found on running binary files.view story

https://bbs.archlinux.org – dancer69 wrote:bash: ./QtADB: No such file or directoryThis is the error message you get when the ELF loader, that loads the program into memory, is missing.What architecture are you running? 32 bit or x86-64? You can find out the ELF loader aka interpreter by using the readelf command:$ readelf --segments /bin/bash . . (HowTos)