Search Results

Search: Posts Made By: chapmana
4,061
Posted By chapmana
Hi, I tell you what i thinks we are getting...
Hi,

I tell you what i thinks we are getting confused, here is the full source code for the script im writing, run it and hit X to exit and i get an error. Type in a wrong number and it errors also...
4,061
Posted By chapmana
so the eq means if its not equal to 1 then its...
so the eq means if its not equal to 1 then its not correct? is that right?
4,061
Posted By chapmana
well i haven't used the else in a script but for...
well i haven't used the else in a script but for instance

if [ $choice = 1 ]

then

echo "cool its working"

exit 1

else

echo "not working try again"

sh andy1

fi

is...
4,061
Posted By chapmana
Else in If Statements
Sorry to be a pain, but how does the else work in the if statements?

Ive been making scripts with if statements but i cant get the else statements working.

Can you help?
3,048
Posted By chapmana
This is the code, but when i enter an if...
This is the code, but when i enter an if statement saying if greater that 12 the echo an error message but when im typing X in to exit its saying its an incorrect character entered but i thought that...
3,048
Posted By chapmana
Cheers
That worked but now im getting an error when an incorrect character is entered. Any ideas?
3,048
Posted By chapmana
Error Message
I keep getting an error message in a script im writing, this line is allways pointed out.

if [ $choice =1 ]

and this is the message i keep getting.

line 32: [: 8: unary operator expected
...
4,178
Posted By chapmana
Thanks all sorted.
Thanks all sorted.
4,178
Posted By chapmana
Also, How can i zip all the subfolders in a...
Also, How can i zip all the subfolders in a directory aswell?
4,178
Posted By chapmana
Zip Problems
How can i zip all files in a directory is they have no extensions on the files, Zip cannot see them.

Please Help
10,369
Posted By chapmana
I cant seem to get it working my code is set up...
I cant seem to get it working my code is set up like this:

read ans

if [ $ans = X ]

then

echo "Thanks For Using Logit, Goodbye" $fname $lname


exit 1

else
echo "Wrong...
10,369
Posted By chapmana
Return Key
Is it possible to enter data into a read command and automatically enter, for instance

read name
echo "Andy" /r


could this work cos it doesn't seem to be working for me!
6,634
Posted By chapmana
Restart Script
Hi,

I am writing a script and need to goto the start of the script if an incorrect command is wrongly entered what can i do.

Andy
7,150
Posted By chapmana
1) I dunno is it SSH? 2) Sorry i meant in a...
1) I dunno is it SSH?

2) Sorry i meant in a script.
7,150
Posted By chapmana
im working in secure crt and for instance im...
im working in secure crt and for instance im writing a script to run the ping command to test if its recieving but the command goes on so long i want to stop it half way through.
7,150
Posted By chapmana
Stopping a command during the cycle
Hi,

Two things really:
1) can you input a code to pause a program until a key is pressed?
2) can you stop a command during a cycle?
3,798
Posted By chapmana
Thanks im having so much fun learning this it...
Thanks im having so much fun learning this it takes me back to the days of qbasic and writing batch files but on a more extreme scale.

Thanks
60,066
Posted By chapmana
Thanks for the help it worked! Also how would i...
Thanks for the help it worked!
Also how would i shut down a command half way through its cycle in a script?

Andy
60,066
Posted By chapmana
Turning Echo off
Hi,

Is there any way like in dos to turn the echo off in a script? i have some lines popping up that i dont wish to be viewed when i am unziping a file it brings up the message updating: log.txt...
3,798
Posted By chapmana
Hi, This is the code im running, now where...
Hi,

This is the code im running, now where it says log.txt i want to put a line of code in to create a new file each time and adjust the other log entries

#!/bin/sh
echo STARTING......
date...
3,798
Posted By chapmana
File increase
Sorry im really new here this is my second post today!

My question is, im trying to write a script and i want to output to a text file but i want each text file to be different so for instance...
1,566
Posted By chapmana
thanks guys that worked!
thanks guys that worked!
1,566
Posted By chapmana
Text Files
I am a beginner and im writing my first script, i am using the code date >log.txt but everytime i run the script the text gets overwritten. how can i keep this code but have it paste in the line...
Showing results 1 to 23 of 23

 
All times are GMT -4. The time now is 10:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy