LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-04-2006, 06:16 AM   #1
squirrel001
Member
 
Registered: Feb 2006
Posts: 51

Rep: Reputation: 15
help me with shell script


Hello
i want to write a shell script that will run when i log in to my account (everytime) and start downloading from a site using wget. i'm new to linux and so please tell me if it is possible and if possible how to write it.
please note that i do not have root password.
please help me
 
Old 06-04-2006, 07:41 AM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
$HOME/.bash_profile is run every time you login provided you use bash as your shell (chances are you do). You can simply put the wget command in that file and it'll be run every login.
 
Old 06-05-2006, 04:10 AM   #3
squirrel001
Member
 
Registered: Feb 2006
Posts: 51

Original Poster
Rep: Reputation: 15
i tried that. i use httrack to download. but the problem is whenever i log in after rebooting, the system doesn't start (after giving the login name and password), thatis i cannot login in my account. but if i login using the ctrl+alt+f1 keys everything works fine.

i changed the file like this:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME

export PATH=$PATH:/tmp/mybin/htt/bin
httrack http://www.yahoo.com -o /tmp/myfolder proxyuserroxypass@proxyort


-----------------------------

is there any error in the code?
 
Old 06-05-2006, 04:14 AM   #4
squirrel001
Member
 
Registered: Feb 2006
Posts: 51

Original Poster
Rep: Reputation: 15
httrack is install in /tmp/mybin/htt
 
Old 06-05-2006, 04:15 AM   #5
squirrel001
Member
 
Registered: Feb 2006
Posts: 51

Original Poster
Rep: Reputation: 15
please don't mind the smilies, colon with p happened to changed to that.
 
Old 06-05-2006, 05:00 AM   #6
squirrel001
Member
 
Registered: Feb 2006
Posts: 51

Original Poster
Rep: Reputation: 15
here is my observations:
whenever i write
httrack http://www.yahoo.com -o /tmp/myfolder proxyuser:Proxypass@proxy:Port -i

i can not login. here -i is optional parameter of httrack (for continuing interrepted downloads)

but if i write without the -i option like

httrack http://www.yahoo.com -o /tmp/myfolder proxyuser:Proxypass@proxy:Port

everything goes fine. but i need the -i option. what should i do now?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script inside shell script treotan Linux - General 4 02-19-2009 06:34 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
I made a shortcut to a shell script and it is using default shell icon... shlinux Linux - Software 2 04-20-2006 06:29 AM
Alias or shell script to confirm 'exit' commands from a shell rose_bud4201 Programming 2 03-08-2006 02:34 PM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration