LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-13-2009, 12:28 PM   #1
notoriouskingpin
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
need help with skipping line in text file


this is the code


#!/bin/sh
echo -n "Enter a file name : "
read file
grep -w jones $file


output

LINE1 here is jones is in this file
LINE2 this is a line with the surname jones and other text
LINE3 this also a line with jones in it

how do you skip the first 20 characters, so it would look something like this

e.g.

output

LINE2 this is a line with the surname jones and other text
LINE3 this also a line with jones in it
 
Old 03-13-2009, 01:12 PM   #2
neo2k
LQ Newbie
 
Registered: Aug 2008
Posts: 21

Rep: Reputation: 15
try using HEAD command..
 
  


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
help with c program to read each line from text file, split line , process and output gkoumantaris Programming 12 07-01-2008 12:38 PM
C++ text file line by line/each line to string/array Dimitris Programming 15 03-11-2008 08:22 AM
how to change some text of a certain line of a text file with bash and *nix scripting alred Programming 6 07-10-2006 11:55 AM
SED - display text on specific line of text file 3saul Linux - Software 3 12-29-2005 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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