Reading text from a file using shell scripting.
I need to write a shell script that reads text from a file and prints it out. I have never wrote a shell script before and was looking for some help. I have a php3 script that I wrote to do exactly the same thing that I need this shell script to do. Here it is:
Code:
|
i think 'cat' should do what you want (man cat).
basically it would be: #!/bin/ksh cat filename remember to 'chmod 744' your shell script hope this does it. ~schneidz |
Do you need to format the output in HTML like the php script is doing ?
|
Basically, I have 4 lines of test that get wrote and the written over every second. I just need the text to be printed out four sentences in 4 lines. Will this code do it?:
Code:
#!/bin/ksh Code:
|
Quote:
Why do you want to write a shell script if you already have a working php solution ? |
I have to run the script from a network camera that only supports shell scripting not php. I was checking to see if the java script would be able to be added in a shell script.
|
Also will cat do what I am trying to do? I need to read a text file and print each line out......is that what cat does?
|
Okay, a network camera ... is it running linux ?
Well, here is something that may work: Code:
#!/bin/bash |
Yes it has a built in linux os. Could I code this into a text file and upload it to the camera or does it have to be coded in a linux os?
|
Could this be done as a mish shell instead of a bash shell?
#!/bin/mish instead of....... #!/bin/bash |
The linux os is Elinux and the camera supports mish shells
|
I've no idea what mish shell is, nor want to ...
Well, you can try and see if it works, or find this shell's documentation. |
All times are GMT -5. The time now is 04:18 AM. |