The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. October 11, 2008, 02:19:18 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Print everything between "http://" to "/" - Does anyone know how?  (Read 3074 times)
skyts
Rookie
**
Offline Offline

Posts: 22


View Profile
« on: June 27, 2007, 01:32:02 PM »

I want to use sed/grep/cat in order to print the content of a .txt file between "http://" to "/" , But I encounter a problem when trying to use the slash on linux.

Usually this is easy to do, But what do you do when you need to print everything between to slashes ?

Logged
thedarkness
Global Moderator
Lifer
*****
Offline Offline

Posts: 577



View Profile
« Reply #1 on: June 27, 2007, 06:26:35 PM »

cat filename.txt|cut -f3 -d"/"

Cheers,
td
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
skyts
Rookie
**
Offline Offline

Posts: 22


View Profile
« Reply #2 on: June 28, 2007, 03:49:19 AM »

Thanks!!! it works...

I am still new to all linux commands since I have been using windows most of the time. But I am catching up now Smiley

Thanks again...
Logged
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!