LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 12-29-2006, 11:17 AM   #1
madhugp
LQ Newbie
 
Registered: May 2006
Posts: 20

Rep: Reputation: 0
shell program, how to find substring plz


hi, could u plz tell , how to pick a part of the
command result like finding substring.

i need to use ls -sh /home/oracle/data1.dbf
it gives 100m /home/oracle/data1.dbf
i want to display only the size 100m
should use any substring concept? or any other
simple method.
 
Old 12-29-2006, 11:43 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
du -sh file | cut -f 1

man du, man cut, man ls, man sed...
 
  


Reply


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
linux shell program problem plz madhugp Programming 4 12-25-2006 11:53 AM
shell commad doubt plz madhugp Linux - General 3 12-24-2006 11:08 AM
php preg_replace substring of a substring senyahnoj Programming 5 12-08-2006 12:31 PM
Shell script: Delete filenames containing a substring? Drack Linux - General 4 02-12-2006 04:11 PM
how to find an exact substring match? ldp Programming 7 02-22-2005 07:28 AM


All times are GMT -5. The time now is 03:51 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration