10 More Discussions You Might Find Interesting
1. Programming
Hello,
I have snippet code from Lippman's <<C++ primer>>.
The program is to convert regular decimal (0 ~ 15) numbers to basic hexdecimals. The instruction tells the program will execute by hitting newline at the end. When I tried to run the compiled program, hitting ENTER did not work as... (3 Replies)
Discussion started by: yifangt
3 Replies
2. Shell Programming and Scripting
I'm trying to stop reading a file until the end of the file is reached or a defined delimiter line is reached. Some how I need to test the fail state of the last 2 commands, not just the last command.
echo -e "hello\ngoodbye\n####\ntesting" | while read line; ]; do echo "$line"; done
hello... (4 Replies)
Discussion started by: Michael Stora
4 Replies
3. Shell Programming and Scripting
Hey guys,
How do I make a loop that reads all the parameters en then stop when there are no parameters anymore ?
Something that gives an output like this:
./Script.sh parameter1 parameter2 parameter3
parameter = parameter1
parameter = parameter2
parameter = parameter3
Thanks a lot,... (5 Replies)
Discussion started by: Miki1579
5 Replies
4. Shell Programming and Scripting
Hi everyone,
I have this problem with a script I'm writting. I want to execute a code running in the background several times through a script. I am writting it like that
parent_script
for a in 1 2 3 4 5
do
exec test -n $a
done
What I want to do is when parent_script is killed,... (0 Replies)
Discussion started by: geovas
0 Replies
5. Shell Programming and Scripting
How can I do this? Actually I have a file which contains a path
e.g.
/home/john/Music/hello.mp3
and I want to take only the filename (hello.mp3) So, I need to read the file from its end to its start till the character "/"
Is this possible?
Thanks, I am sure you'll not disappoint me here!
Oh,... (9 Replies)
Discussion started by: hakermania
9 Replies
6. Shell Programming and Scripting
Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies
7. Shell Programming and Scripting
Hello everybody!
I am new to this and I am trying to change a script in an open source program that plots some offset vectors and then calls a postscript viewer. I have commented away the call for the postscript viewer but somehow the script doesn't return to the shell prompt. I cant figure out... (3 Replies)
Discussion started by: larne
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am writing a bash shell script. How can I tell it to stop. For example, I would like to have something similar to the following:
mike=1
if ; then
STOP THE SCRIPT
fi (3 Replies)
Discussion started by: msb65
3 Replies
9. Shell Programming and Scripting
Hi All,
I am on a Solaris OS and i have come up with a csh script named " mycshscript " which will grab data from a datalog file & format the grabbed data & upload formated version to web server. I would want to have this script to run non-stop so that the latest can be captured since data is... (37 Replies)
Discussion started by: Raynon
37 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
I got a script that runs automatically using the cron file.
The script starts running at midnight and suppose to delete image files from folders and sub-folders. The script ends when he finishes deleting or after 5 hours. My problem is that the script doesn't stop running even after 5... (3 Replies)
Discussion started by: biot
3 Replies