Website-Command Line Prompt


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers Website-Command Line Prompt
# 1  
Old 02-17-2009
Website-Command Line Prompt

Hello guys...

I am having a doubt. Please try to rectify it. I would really appreciate it.

The thing is that is it possible to open any website say for example,google from the command line prompt(terminal) if you are working in Linux-fedora...
I am very new to Unix.

regards,

Mahesh...
# 2  
Old 02-17-2009
The code below uses firefox (or mozilla if you swap the commented lines around) to open the url in an already running copy, or open a new instance if it is not already running.
Debian has a www-browser object which normally points to firefox, dunno if fedora has a similiar setuo.
Code:
#!/bin/bash
#
# mozilla=/usr/bin/mozilla
mozilla=/usr/bin/firefox
if ( $mozilla -remote "ping()" &> /dev/null );then
 $mozilla -remote "openurl(http://www.google.com, new-tab)" &
else
    $mozilla http://www.google.com &
fi

# 3  
Old 02-17-2009
Thanks a ton wempy...
Its really working fine for me.

I will send more doubts in future.. expecting your mutual coperation...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies

2. Shell Programming and Scripting

Two-line prompt using Korn

I'm attempting to set up a two-line prompt using Korn. This is what I've set up in .kshrc PS1='$(print -n "`logname`@`hostname`:";if ] then; print -n "~${PWD#$HOME}"; else; print -n "$PWD";fi;print "\n$ ")' And in .profile, ENV="$HOME/.kshrc"; export ENV The hosts that in use are... (10 Replies)
Discussion started by: capnpepper
10 Replies

3. Shell Programming and Scripting

Is it possible to prompt for input if not given on command line?

I have a script built that takes the standard inputs $1 $2 $3 after the name and parses some data. hexsite=`echo "obase=16;$1"|bc` hexfix=$(printf "%.3X" 0x$hexsite) if || ;then type=33 elif || ;then type=59 elif ;then type=99 else type=00 fi cat /directory/*.2012$3*| I am... (8 Replies)
Discussion started by: PCGameGuy
8 Replies

4. Infrastructure Monitoring

Nagios Check Website Command help

Hi all, me again.... I am trying to add a website to my nagios checking juggernaught I am using the script from nagios exchange site called check_website_response (google to find it i am not allowed to post links yet, sorry) It is in /usr/local/nagios/libexec with the rest of the default... (1 Reply)
Discussion started by: Yoshi17
1 Replies

5. UNIX for Advanced & Expert Users

autosys command(autorep) from command prompt

Hi, I am using AUTOSYS GUI based tool. But I want to get the job status from the UNIX command prompt. 1. I want to execute only autorep command in the UNIX command prompt. If need to execute this command what are the settings need to do that. 2. Is it possible for executing this... (5 Replies)
Discussion started by: onesuri
5 Replies

6. Shell Programming and Scripting

How to enter if-then condition on command prompt/line ?

Hi I have some trouble entering if-then condition in a single line on a command prompt in csh. Could someone show how does one do that ? eg: source .cshrc; cd $dir; pwd; test -d $backup_dir; if then mkdir -p ${backup_dir}; echo inside loop; fi; echo outside loop; mv -f... (3 Replies)
Discussion started by: mpc8250
3 Replies

7. AIX

prompt line

Hlo sir My system file / system file is full and i am unable to enter any command such as ls or to start my server RS6000 The network is blocked and the users are log off. (0 Replies)
Discussion started by: sobnc
0 Replies

8. SuSE

inconsistent ls command display at the command prompt & running as a cron job

Sir, I using the following commands in a file (part of a bigger script): #!/bin/bash cd /opt/oracle/bin ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out If I run this from the command prompt the result is: 2007-05-16 if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies

9. UNIX for Dummies Questions & Answers

Path in prompt line?

Can anyone tell me what makes the current path appear in the prompt ? thx (4 Replies)
Discussion started by: Leitwolf
4 Replies

10. UNIX for Dummies Questions & Answers

2 line prompt

I know this is very easy. I just am having a problem determining how to do it. I want to have a 2-line command prompt when you hit return. I have no problem creating or exporting a PS1, but can't make into 2 lines. hostname-user:/path/to/dir # I really should know this, but my brain... (7 Replies)
Discussion started by: Kelam_Magnus
7 Replies
Login or Register to Ask a Question