![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell Scripting Question | vijaykrc | UNIX for Dummies Questions & Answers | 8 | 01-14-2008 08:08 AM |
| Shell Scripting Newbie | mattyjim2 | UNIX for Dummies Questions & Answers | 1 | 10-11-2007 03:20 AM |
| Shell scripting newbie - please be gentle. | charliemp3 | Shell Programming and Scripting | 2 | 08-01-2007 10:25 AM |
| Shell Scripting Question | tech2040 | Shell Programming and Scripting | 3 | 08-09-2005 10:32 PM |
| Shell Scripting Question | tech2040 | Shell Programming and Scripting | 1 | 08-08-2005 11:34 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
shell scripting newbie question
Hi all!
I'm a newbie to shell scripting. I want to create a script that will store a line from a text file in a variable so I can then use it to open firefox with that text in the address bar (the text file contains a list of addresses). I have tried the following: Code:
#!/bin/sh
a='sed -n 2p ~/text/text.txt'
firefox "${1:-$a}"
Please help... |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Replace the single quotes ' with backticks `
Code:
a=`sed -n '2p' ~/text/text.txt` ZB |
|
#3
|
|||
|
|||
|
thanks!
Quote:
It works now! Previously I didn't even know of the existence of backticks... Again, thanks a lot... |
|||
| Google The UNIX and Linux Forums |