In end of http://www.unix.com/shell-programmin...les-shell.html
mjd_tech gives script which can read some values directly without manually input, but if no value is the right one, my understand is, it will on hold for waiting the next input, but when I run below codes, it keeps running and refresh my screen.
Code:
while [ "$line" != "Fred" ]; do
read l
I got a problem to read standard input file, to edit the standard input, and to write the output to other file.
Could some one tell me a single line command to feed my cmd input from a file and delete the same file while the command is still running?
EDIT: By single line command I meant, performing this entire action in one command. This behavior has got to do with executing processes and commands simultaneously.
Dear All
I apologize in advance if the following problems I am facing seem 'basic'.
I am a newbie to Unix systems and trying to learn and adapt.
I am trying to install fred-client-2.2.3 on Ubuntu 8.04 - the Hardy Heron.
So I first downloaded the .tar.gz file from
I've got a script that runs a number of curl commands by reading an input file line by line (each line has different curl parameters). I'm trying to tee the stnd out and stnd error of the curl command to a log file as well as display them to the terminal. Simple, right?
But for some reason tee will not save the output to the subdirectory where I want the log file.
I would like to redirect output of command line in for loop as $line.
Output should be processed as line but instead it throw whole output.
Could somebody help me on how to redirect output of command line and process it line by line without sending output to any file.
I have a bare git repository setup for user fred:
/home/fred/foo.git
I have set the group of every file in foo.git to bar:
$ chown -R fred:bar /home/fred/foo.git
(Note that fred is not a member of group bar)
And I have set the setgid bit on for every directory in foo.git:
$ find foo.git -type d -print0 | xargs -0 chmod g+s
However when fred commits to the git repository, the group is not
Hi all,
I am trying to write a code for addition of n numbers which will be passed by the user as command line arguments.
I wrote the following code.
Code:
add=0
for (( i = 1 ; i <= $# ; i++ ))
do
add=`expr $i + $add`
done
#echo "sum is : $add"
input :
Code:
$./add.sh 12 32 14 25
Now the problem is the $i is giving values 1,2,3....
Hi-
I have a project in my operating systems class that requires me to write a program that creates N semaphores. The arguments entered into the command line are: filename ropt NS value1 value2 ...