LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-08-2003, 08:16 AM   #1
dahljor
LQ Newbie
 
Registered: Jul 2003
Posts: 1

Rep: Reputation: 0
cut-problem


Hi

I'm need to get the process-name from a "file <core>" , and thought of useing cut.

When I run "file core", I get this line:

core: ELF 32-bit LSB core file of 'crawler' (signal 11), Intel 80386, version 1, from 'crawler'

I want to catch the word between ' ' (here: crawler). I don't know what to do, do I need to use cut? or grep?
 
Old 07-08-2003, 12:51 PM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
moved to the Programming forum
 
Old 07-08-2003, 12:58 PM   #3
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
how about:

file core | cut -d\' -f2
 
  


Reply



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
Ls and cut problem Phiebie Debian 2 07-14-2005 07:10 AM
How can I cut something between quotes? jfall Linux - General 2 02-09-2005 09:03 PM
mozilla cut/copy and paste problem gw1500se Mandriva 5 04-27-2004 08:35 PM
Ok, maybe I'm not cut out for linux... goosegg Linux - Newbie 5 09-01-2003 03:43 PM
cut and paste c0c0deuz Linux - Newbie 6 11-01-2001 12:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:14 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