Search Results

Search: Posts Made By: kitay
12,089
Posted By kitay
I did save them, I used the command ZZ that is...
I did save them, I used the command ZZ that is exit and save and I get the error after Ive executed the program and pressed 1 then enter. :wall:
12,089
Posted By kitay
I am still getting the same error, is it my...
I am still getting the same error, is it my computer that does this or is it my scripting?
12,089
Posted By kitay
Some changes and a new error
Some changes and a new error! I am now using the VI editor, and the code is now #/bin/bash
echo "Test script"
read cake
if [ $cake == "1" ]
then
echo "The Cake is a lie"
else
echo "The shit?"...
12,089
Posted By kitay
I remote control my computer over SSH Atm, may...
I remote control my computer over SSH Atm, may that be the problem? (Just a taught)
12,089
Posted By kitay
Outputs: marius@ubuntuserver:~$ wc -l test.sh ...
Outputs:
marius@ubuntuserver:~$ wc -l test.sh
7 test.sh

marius@ubuntuserver:~$ sed -n l test.sh
#/bin/bash\r$
echo "Test script"\r$
read cake\r$
if [ "$cake" == "1" ]\r$
then\r$
echo...
12,089
Posted By kitay
The real deal
I am trying to make a script where I can early execute commands, edit stuff etc...
example:
I type the letter 1, it does something
I type 2, it does something different

My code:
#/bin/bash...
810
Posted By kitay
I have no idea how to solve this :/
I am trying to make a script that will execute different things by the input

Input:
#/bin/bash
echo "Test script"
read cake
if [ "$cake" == "1" ]
then
echo "cake it is"
fi


Output:...
12,089
Posted By kitay
I can't get what I'm doing wrong!
I am making a shell script that will have "shortcuts" to do different tasks and I can't get what I'm doing wrong (this is just a test script)

read cake
if [ $cake == "1" ] then
echo "1 it is"...
Showing results 1 to 8 of 8

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