| Author | Topic: Syntax help with unzip on 7z please. (Read 807 times) |
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: Syntax help with unzip on 7z please. « Reply #15 on Jan 7, 2012, 3:05pm » | |
Code:| 7z x ukbrian.7z -o/home/user/ |
|
will extract it to /home/user
edit: it should be x
don't read if you want to do it by yourself. Your unzipping script should look like this:
Code:#!/bin/sh 7z x ukbrian.7z -o$HOME sed -i "s*/home/user*$HOME*" $HOME/ukbrian/desktop.menu
|
|
First line will unpack, second will change /home/user to /home/nameofuserwhorunthis in desktop.menu, so it can be immediately used for menu without changing anything
|
Skallagrigg |
|
Richard Elder Member
     member is offline
![[avatar] [avatar]](http://dl.dropbox.com/u/10332409/bender.gif)
Joined: Jan 2011 Gender: Male  Posts: 593 Location: Venezuela
|  | Re: Syntax help with unzip on 7z please. « Reply #16 on Jan 8, 2012, 9:27am » | |
@ukbrian, I'm going on again  Yes, I remember. Had a Commodore64 for my first toy, then a couple of Kaypro CP/M green boxes (my first hard disk --a huge 10MiB), discovered TurboPascal, then a 286 clone w/ MSDOS 3.11, etcetera.
|
SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae; SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae LinuxMint-14, Xfce4.10, w/3.5.0-17-generic |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 285
|  | Re: Syntax help with unzip on 7z please. « Reply #17 on Jan 8, 2012, 10:35am » | |
Quote:| don't read if you want to do it by yourself |
| I need spoonfeeding when I ask, I have very limited bash knowledge but generally I can take what's offered and extend it, if i understand the data being proccessed, your script now looks like Quote:#!/bin/sh # script further developed by ukbrian based on a script by "petrik" on the SalineOS forums # # # unzips ".ukbrian.7z" file into "$HOME" the users home folder 7z x .ukbrian.7z -o$HOME # # #corrects the <AppDir>/home/me/ukbrian/applications/</AppDir>" line in ALL the .menu files menu launcher in the top panel reads sed -i "s*/home/user*$HOME*" $HOME/ukbrian/desktop.menu # # #corrects ALL the "Icon=/home/user/ukbrian/dials/reboot.png" lines in the launcher files in that folder sed -i "s*/home/user*$HOME*" $HOME/ukbrian/applications/*.desktop # # # corrects "Icon=/home/user/ukbrian/icons/safe-00.png" in the launcher files in that folder sed -i "s*/home/user*$HOME*" $HOME/ukbrian/SalineOS qt4-fsarchiver Rescue Disk/*.desktop #/home/user/ukbrian/dials/manual-00.png |
| Thank you again buddy.![[image] [image]](http://smilies.lin.me.uk/pics/man-hugs.jpeg)
Developing things further now you set my direction with that script. 
To satisfy an old man's curiousity what coding languages are you happy in on prefer working with?
| |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 285
|  | Re: Syntax help with unzip on 7z please. « Reply #18 on Jan 8, 2012, 11:22am » | |
Quote:@ukbrian,
I'm going on again 
Yes, I remember. Had a Commodore64 for my first toy, then a couple of Kaypro CP/M green boxes (my first hard disk --a huge 10MiB), |
| Please don't hesitate to "Go on" you have a life times experience, some folk go through life with their eyes closed Quote: discovered TurboPascal, then a 286 clone w/ MSDOS 3.11, etcetera. |
| The old disabled guy, he's had a kidney out, he's had a triple heart bypass and he's over weight and diabetic, who hosts my domains enjoys using borlands pascal Delphi. We were recently looking at http://en.wikipedia.org/wiki/Lazarus_%28software%29 I want to be able to produce screen forms to show others my thinking. I'd love to start doing a basic gui for collecting the data clonezilla needs to back up a partition and then run a script to do the backup, very simular to the qt4-fsarchiver screen but using seperate tabs for backup , restore and maybe profiles.
| |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 285
|  | Re: Syntax help with unzip on 7z please. « Reply #19 on Jan 8, 2012, 11:47am » | |
Quote:| change the files after unzip to contain the proper path. |
| This way please, I tried putting the ukbrian(was xfce-menus) all over the place to avoid the path problem but I also want the menus to be easily accessable and changeable for the end user and in the home folder unhidden is what i decide after a lot of trial and error.
I'm trying to get everything installed in this one central place, i'm putting the firefox folder and firefox profile folders there plus foldermovers files & data and I'm putting a scripts folder there for firefox's speed dial to access html menus i've been working on.
Life is so enjoyable, unless it's the medication
| |
|
Richard Elder Member
     member is offline
![[avatar] [avatar]](http://dl.dropbox.com/u/10332409/bender.gif)
Joined: Jan 2011 Gender: Male  Posts: 593 Location: Venezuela
|  | Re: Syntax help with unzip on 7z please. « Reply #20 on Jan 8, 2012, 2:57pm » | |
The Lazarus writeup is actually in the Jan issue, http://www.linux-magazine.com/Issues/2012 Probably a good time to start, since FPC just upgraded and will break some old code. If you start now use the latest and have less problems for new code. Lazarus will make doing what you want with Clonezilla relatively easy.
|
SalineOS-1.7, Xfce4.6.2, w/3.2.0-0.bpo.4-686-pae; SalineOS-2.0, Xfce4.8, w/3.2.0-4-686-pae LinuxMint-14, Xfce4.10, w/3.5.0-17-generic |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 285
|  | Re: Syntax help with unzip on 7z please. « Reply #21 on Jan 9, 2012, 12:45am » | |
Jan 8, 2012, 2:57pm, Richard wrote:The Lazarus writeup is actually in the Jan issue, http://www.linux-magazine.com/Issues/2012 Probably a good time to start, since FPC just upgraded and will break some old code. If you start now use the latest and have less problems for new code. Lazarus will make doing what you want with Clonezilla relatively easy. |
| I tried and failed with that revue, they wanted me to spend some of my OAP pension to read it but I found this one http://mikemacd.wordpress.com/2011/11/14....nd-screenshots/ it's a blog with no date on it but it looks like i'll need a snapshot when/if someone installs it.
I'd like to get into doing a bit of proto typing screens in it if you would be kind enough to help me into it. know an excellent app for sharing data, desktops, voip etc.
Quote:Once I finally got it running my immediate reaction was summed up by the word “w00t“. Despite the always ugly multi-window layout here was an environment and language I knew like the back of my hand (so long as I rewind my memory 15 years) and could quickly put together good looking cross-platform apps in  |
| Sounds like it will do a good cross platform job just recompile for the platform you want. The database I had a bespoke office app written in you could compile for dos/windows or unix just by doing 3,4 search/replaces before compiling.
The other one I bumped into was http://kivy.org/ using python another cross platform language i think but it really is down to the developers, if we can attract any, they're a very rare breed that value their time. There was talk on this link about built in audio/video but I can't find the reference now. http://kivy.org/planet/ but I have been watching a site where the guy has developed very good audio/video codecs.
The upload has finished, it is a zip file that compresses into a "watch-me-first-video" and unpacks the ukbrian folder with the custom menu and the folder-view desktop panel.
I expect a few minor problems with it like missing icons etc. and I need to sort out what to put on the menu and the order they display at. http://lin.me.uk/temp/ukbrian-folder-video.zip
I use one of these thingies http://www.cclonline.com/product/54784/I....-Rack/ HDD0516/ I used to use one of these esata/usb hubs http://www.cclonline.com/product/27336/I....-Dock/HDD 3271/ but the rack is much better.
I'm very keen to get the GUI done for a clonzilla drive/partition backup, the one I use after you have done a backup you can put a launcher/short cut on your desktop so that with one click it runs the backup with no questions which is great for novices, i always do that when I put a machine together for someone.
This is a video of the best bar none desktop I Know of and also a video of my current drive/partition backup/restore software, i stumble a little as they brought out a major update to the software and i've been using it for the past 10 months so being back on the old was a bit of a shock but i actually prefer the old screen forms. http://youtu.be/Oy16n5chAmo It's going to take another hour before youtube processes the video so try again later.
I had to put it on youtube as i can't access my domain at the moment, I think it's because my domain is being moved to another server this month.
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: Syntax help with unzip on 7z please. « Reply #22 on Jan 9, 2012, 3:21am » | |
You're welcome, buddy. A little bit off-topic, my username is petrek (like in star trek), not petrik Since we're not cats, so it's safe for us to be curious;) What I prefer depends on a code that I need to write. I can code in c, shell, php + mysql, java (but I try to avoid it if I can, i don't like it too much), and of course I like my first languages I learned in the days of Amiga1200: logo and pascal. Now I learn assembler, as it's crucial to fully understand how other languages work.
|
Skallagrigg |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 285
|  | Re: Syntax help with unzip on 7z please. « Reply #23 on Jan 9, 2012, 9:42am » | |
big, big sorry for my gaff, I feel a right ****,
![[image] [image]](http://smilies.lin.me.uk/pics/a-s-head-banger.gif)
I blame it on the moon, I always go a bit funny around the full moon, particularly in the spring and autumn, that mad brian again.
Quote:| What I prefer depends on a code that I need to write. |
| Very true some languages are better for some tasks than others I think.
Quote:| I can code in c, shell, php + mysql, java (but I try to avoid it if I can, i don't like it too much), and of course I like my first languages I learned in the days of Amiga1200: logo and pascal. Now I learn assembler, as it's crucial to fully understand how other languages work. |
| that's a hell of a selection. It doesn't get any lower than assembler does it and c ain't far behind.
I had an Amiga 500 I think briefly but swapped it for a 21" CRT monitor that weighed a ton but was lush to work on compared to the 15" ones.
i've never done anything with pascal, I started off learning to tweak this one http://www.sculptor.co.uk/ when it compiled into unix and dos. The guy who wrote my bespoke office app said there were no brick walls with it, if it didn't do what you needed you could write a bit of basic and plug it in not like most 4GL's.
I was up all last night and today is a slow thoughtful day tidying things up to make it easier to start again.
Maybe a good start would be to do a GUI for fsarchiver as I think Richard wrote that he had been using the cli version for a time so he would know a lot of the command line bits.
Strange I turned up the magnification in firefox for text using nosquint to 120% and my writing got bigger but anything enclosed in a quote block stays small.
I started using those custom menus about four months ago and they stuck, they are the first thing I put on a fresh install, being fully contained in one folder should make it easier for folk to sus how they work but I will do another video soon now that the structure has been decided and you solved all the problems. 
All the very best and I'll do my best not to put my foot in it again. Thank you for all your help
![[image] [image]](http://smilies.lin.me.uk/pics/a-s-hi-five.gif)
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: Syntax help with unzip on 7z please. « Reply #24 on Jan 9, 2012, 12:13pm » | |
It's ok, don't worry about it, I think it's a feature not a moonbug I get used to it when I lived in London. No matter how I tried, spell, wrote, they always get my real name wrong I just pointed that out to avoid confusion later. I can't imagine writing website code in assembler. And there's still machine code left If I could learn that, I think I would have no problems with any other language, even/odd english And I must thank you here for giving me some insight why you're using "a" and "the". Mounting a horse without "a", it's definitely not the same experience  All the very best to you also (don't know how to put those smileys here).
|
Skallagrigg |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 285
|  | Re: Syntax help with unzip on 7z please. « Reply #25 on Jan 10, 2012, 6:59am » | |
@Anthony Sorry, I apologize for abusing your space, I was on another forum where a female was complaining about some of the posts made, please moderators feel free to correct anything I write, particularly if I post wrong advice or an incorrect syntax thingies. I will try not to offend again, I am only a humble guest who is very grateful for your hospitality and patience.![[image] [image]](http://smilies.lin.me.uk/pics/a-s-mad-264.gif)
Quote:| big, big sorry for my gaff, I feel a right ****, |
|
Is it OK to carry on with this off topic discussion or would it be better posted elsewhere? I realise the time difference so I will carry on here for now
| |
|
petrek Senior Member
    member is offline
![[avatar] [avatar]](http://img543.imageshack.us/img543/3784/avatarebm.jpg)
Joined: Aug 2011 Gender: Male  Posts: 386 Location: Poland
|  | Re: Syntax help with unzip on 7z please. « Reply #26 on Jan 10, 2012, 8:31am » | |
When discussing it's hard for me to keep to one thread, so maybe it will be better to talk through PM or email? And keeping to thread, I would add some things to your script, not everyone has 7z installed.
|
Skallagrigg |
|
Anthony Nordquist Administrator
     member is offline
![[homepage] [homepage]](http://images.proboards.com/new/buttons/www_sm.png) Joined: Dec 2010 Gender: Male  Posts: 1,338
|  | Re: Syntax help with unzip on 7z please. « Reply #27 on Jan 10, 2012, 8:32am » | |
I have no problem with the thread getting de-railed, as long as the language stays clean.
| |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 285
|  | Re: Syntax help with unzip on 7z please. « Reply #28 on Jan 10, 2012, 10:49am » | |
Jan 10, 2012, 8:31am, petrek wrote:| When discussing it's hard for me to keep to one thread, so maybe it will be better to talk through PM or email? And keepingto thread, I would add some things to your script, not everyone has 7z installed. |
| I'm creating a very jumbled mess here by talking about to many separate things so to clarify.
1 qt4-fsarchiver rescue CD project 7z is on the CD so there shouldn't be a problem. I think the cd is almost done but I need to have another look at it first and upload the finished CD and confirm he is happy with having it posted on Mint and Ubuntu forums but I would like SalineOS to look it's very best. One idea the old fool had was as there's an installer script as is but the live iso is a very, very cut down version of SalineOS The guys at refracta have started to develop a script for selecting software to install and as with the refracta install script it installs what's running in the live session maybe enhance their script to upgrade the live CD for an install. http://lin.me.uk/refracta/refracta-scripts.7z
maybe at boot a question of
Quote:| Do you wish to run SalineOS at a basic level or at her finest which takes longer to load as it will be installing apps(programs and you will need an internet connection. |
|
You can also upgrade/install SalineOS after you have booted. For this restore/backup a partition or would you like to see SalineOS at it's finest
or after booting a big button asking to restore missing apps.
It just seems a wasted opportunity to not showcase SalineOS to a larger audience.
thinking why not a normal install cd boots up very quickly and then a menu simple basic novice selection
advanced web developer Audio/video server guy etc
and then display a list of apps selected that the user can amend
i gotta give up this thinking, i'm sure it's the company i'm keeping
2 Xfce custom menus to download/install 7z could be a problem but if there's a warning that you must have 7z loaded and instructions how to would that do? Or would the script check if 7z is installed, if not a message "You need 7z to unzip this file for better compression & smaller files always use 7z(7zip) OK to install 7z"
Hope I make a little sense, I find videos easier ![[image] [image]](http://smilies.lin.me.uk/pics/s-m-cool-00.gif)
Are the pics annoying to anyone? ![[image] [image]](http://smilies.lin.me.uk/pics/s-m-have-fun.gif)
![[image] [image]](http://smilies.lin.me.uk/pics/s-m-sorry-08.gif)
If pics are good then i think these sign ones have potential by changing the words
![[image] [image]](http://smilies.lin.me.uk/pics/s-s-off-topic.gif)
I'm quite confused so bye, bye
| |
|
ukbrian Senior Member
    member is offline
Joined: Aug 2011 Gender: Male  Posts: 285
|  | Re: Syntax help with unzip on 7z please. « Reply #29 on Jan 10, 2012, 10:51am » | |
post started @ 11:45 @petrek
Quote:| And I must thank you here for giving me some insight why you're using "a" and "the". Mounting a horse without "a", it's definitely not the same experience |
| If my grammer is incorrect I'm sorry but I'm a working class guy who spent his life doing manual work and the academic side is not easy for me, I find videos much easier to explain my point. Please forgive an old man ![[image] [image]](http://smilies.lin.me.uk/pics/a-s-old-025.gif)
Quote:| (don't know how to put those smilies here) |
| If you look at the image properties you will see that I have the pics on a sub-domain at "smilies.lin.me.uk/pics/" The big question is whether using them adds anything to the forum, are they worth while, is it worth the effort?
The guy who done my office app, lem or lemming, started life on unix but for the last 14 years has been working in visual basic and lately with c# in a windows environment and has a web site and forum devoted to amsterdam coffee shops.
I posted a pic on his forum one day and he asked how I did it as the smilies aren't great in phpbb and from that he quickly developed an app to read all the image file names out of a folder(s) into a database
![[image] [image]](http://lin.me.uk/pics/temp/smilies-dbase.png) In which you can change things and then output a web page(s) to be uploaded. http://lin.me.uk/temp/smilies/Happy.html
I installed office 2003 but when I load his .mdb I get compiling errors ![[image] [image]](http://smilies.lin.me.uk/pics/a-m-sad-02.gif)
I think a assortment can enhance the communication on a forum but I would like to hear other folk's opinions.
If it's of merit then I'd like the routine being used on this site http://photobucket.com/images/thumbs%20up%20smiley/
The page isn't cluttered so loads of room for images without scrolling, if you hover on an image and then select "img code" it copies the bits into your buffer for posting in a forum etc.
I've been grabbing smilies from all over the place and that is the best routine I have come across.
If the idea of smilies pages seems worth while perhaps this might be worth doing in lazerus the pascal IDE http://www.google.co.uk/#hl=en&cp=10&gs_....iw=1252&bih=937
I had to grab the pic off the bottom of that page, I've got so much to do I'd better get a move on ![[image] [image]](http://smilies.lin.me.uk/pics/chetah-running.gif)
My friend peter who's servers my domain is hosted on tells me the easiest way with lazarus is to install it on windows and then compile your project for linux
going mad bye bye
| |
| |
|