![]() |
Scripting Help Required - DPKG
Hello!!
I need a little help with scripting. I want to install a .DEB from a script (4 in totoal). I had the idea, but did not go right.. Essentially I want this: (located in MyDocs) Code:
#!/bin/sh I use dpgk -i to install these *.deb files normally. Please help. :o |
Re: Scripting Help Required - DPKG
Quote:
Code:
#!/bin/sh |
Re: Scripting Help Required - DPKG
You're a hero! You come out of nowhere and save the day! AGAIN! :D
|
Re: Scripting Help Required - DPKG
Quote:
Code:
#!/bin/sh Code:
echo "dpkg -i *.deb" | root So echo echos that string back to us, we then use pipe to direct that string to the program root. (root is of course 'root shell', the land of sudo.) So in essence we have: SAY 'dpkg -i *.deb' TO root Code:
echo "job done!" comprende? |
Re: Scripting Help Required - DPKG
Unfortunately this keep throwing errors.
Using the same as you posted: dpkg: error processing *.deb (--install): cannot access archive: No such file or directory. Errors encounered while processing: *.deb (I have also added the start of the filename). When I do it using the full filename: Error is: ./script line 6: syntax error: "|" unextected Edit: If I remove the pipe | all it does is echo the words :( I am doing all this on the N900 if thats any different. |
Re: Scripting Help Required - DPKG
oopz
As the *.deb is in the quotes it is being treated as a literal string as opposed to a globbed expression. Replace the line with: Code:
sudo dpkg -i *.deb |
Re: Scripting Help Required - DPKG
Code:
#!/bin/sh |
Re: Scripting Help Required - DPKG
You're excellent!
I used the one you said that will install all. It worked perfectly! But what would I do to install.. Maybe 2 only. Just seems odd that it failed to install one using the same method. Also: VI_ what does your signature mean/do.... |
Re: Scripting Help Required - DPKG
what does this mean?
Code:
#!/bin/sh |
Re: Scripting Help Required - DPKG
Shell script.
You can also use #!/bin/bash I'm not sure what it fully means in the Linux terminology, the way I know it " this is a script"; |
All times are GMT. The time now is 12:09. |
vBulletin® Version 3.8.8