Search Results

Search: Posts Made By: immyakram
7,035
Posted By immyakram
Hangman Script
Hello everyone, im just having some problem forming a script for a hangman script. The question states:

The object this excercise is for u to write a script that emulate the classic game hangman....
8,003
Posted By immyakram
Script for Hangman Game
Any ideas on whats the best way to form a hangman game via bash shell.
39,654
Posted By immyakram
Any ideas for script 2: Take a copy (backup)...
Any ideas for script 2:

Take a copy (backup) and amend the above script so that it now inserts the first argument into the middle of the file. Please note that no matter how many lines there are...
39,654
Posted By immyakram
:D Thats alright then.
:D Thats alright then.
39,654
Posted By immyakram
Sorry, im new to this forum, thogught it was...
Sorry, im new to this forum, thogught it was supposed to go here.
39,654
Posted By immyakram
Got it thanks a million matey. :D
Got it thanks a million matey. :D
39,654
Posted By immyakram
I have the following in my script ...
I have the following in my script


#!/bin/sh

echo "$1" | cat - "$2" >$$
mv $$ "$2"

Once i have done this and i exit the editor i have done chmod +x firstline.

and then try to see if it...
39,654
Posted By immyakram
well from my understanding the script (firstline)...
well from my understanding the script (firstline) needs to take on 2 arguments which can be done through $. So $1 could be argument 1 and $2 can be argument 2. The script needs to take the first...
39,654
Posted By immyakram
I am running it but dont seem to function ryte.
I am running it but dont seem to function ryte.
39,654
Posted By immyakram
#!/bin/bash file=$HOME/file1 {read $1 ...
#!/bin/bash

file=$HOME/file1

{read $1

} < $2

echo "this first line in $2 is "$1".

then running it - sh script_name $1 $2

Iv been tryna play around with this...
39,654
Posted By immyakram
Not working :( get a error after ./
Not working :( get a error after ./
39,654
Posted By immyakram
Hmmmmmmmm.... files called filex and the script...
Hmmmmmmmm.... files called filex and the script that im creating now and where syntax is called firstline. But still dont knw what to reference after $'s
39,654
Posted By immyakram
No not yet. I think its in the next chapter. Ill...
No not yet. I think its in the next chapter. Ill try ur syntax now.
39,654
Posted By immyakram
sorry correction - I have gotta rite a script...
sorry correction - I have gotta rite a script named 'firstline' that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first...
39,654
Posted By immyakram
Cool. Ryte to make it easy for myself iv changed...
Cool. Ryte to make it easy for myself iv changed the content of my filex to just 10 line of plain and simple text. Now from what i understand the script (firstline) should take the first argument and...
39,654
Posted By immyakram
Oh its just that my material is telling me to use...
Oh its just that my material is telling me to use bin/bash and all of the examples given use this too.
39,654
Posted By immyakram
Iv created a file called filex and i have...
Iv created a file called filex and i have inserted the env details to it.

Did this by touch filex
then env > filex
checked to see if file has got the correct content in by cat filex.

Then iv...
39,654
Posted By immyakram
Thanks prorter i got it now. :D Any chance...
Thanks prorter i got it now. :D

Any chance you being able to do any of the above scripts and then going through them with me.
39,654
Posted By immyakram
yes i have been through variables. enter...
yes i have been through variables.

enter after the leading $

str1=abcd
test $str1 = abcd

then what can i do after this to get my exit result of 0.
39,654
Posted By immyakram
i cant seem to run this syntax on putty, any...
i cant seem to run this syntax on putty, any ideas. Im trying to replicate the syntax as shown above. Is there something i am mising.
39,654
Posted By immyakram
Thing is i understand evrything to that point but...
Thing is i understand evrything to that point but then when i get onto stuff liek testing with conditions - testing charachter data, testing numeric data and testing for files. Let me give you an...
39,654
Posted By immyakram
Iv been trying to go through the relvant material...
Iv been trying to go through the relvant material to help me to complete these exersises. But after doing the If/Decisions statements and commands teh stuff has just seemed to have cabbaged my head....
39,654
Posted By immyakram
A little help please
Hello everyone im new to this forum and to UNIX itself. Iv only been using using UNIX for about 2 weeks now and have kind of come to a dead end with a problem that im suffering from. Im doing a...
Showing results 1 to 23 of 23

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