The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
shell script for extracting out the shortest substring from the given starting and en pankajd Shell Programming and Scripting 18 03-10-2008 06:20 AM
Substring in Shell Script smartbuddy UNIX for Dummies Questions & Answers 3 08-17-2007 10:26 AM
Substring function in UNIX shell script csrazdan UNIX for Dummies Questions & Answers 5 08-12-2006 05:07 PM
Substring function in UNIX shell script csrazdan Shell Programming and Scripting 1 08-11-2006 07:15 PM
Substring in C shell script? dinodash Shell Programming and Scripting 0 03-20-2005 01:59 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-16-2008
jyotib jyotib is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 10
Substring in shell script

I need a help in getting substring of each line in input file.

I am writing a script that will read a file from a directory on daily basis, I mean everyday a new file will be stored in this directory, it will replace old file. I have to read contents of this file, the contents will be as follows:

1090373422,4024901970
1090373422,4025158069
1090373422,4025643181

I have to read these contents line by line and then display them as 1090373422_4024901970.jpg
1090373422_4025158069.jpg
1090373422_4025643181.jpg

I don't know how to get a substring of each line.

Thank you,
Jyoti.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:26 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0