Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

Rep: Reputation: 0


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, 01:51 PM   #2
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, 01:58 PM   #3
Senior Member
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 50
how about:

file core | cut -d\' -f2


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

All times are GMT -5. The time now is 04:36 AM.

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