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
small script help ali560045 Shell Programming and Scripting 9 01-18-2008 10:18 AM
small script everurs789 Shell Programming and Scripting 3 11-06-2007 05:08 PM
change small letters to capital atticus Shell Programming and Scripting 16 06-13-2006 11:35 PM
small script help rkl1 Shell Programming and Scripting 1 12-06-2005 11:26 PM
Need help in a small script super_duper_guy Shell Programming and Scripting 2 10-24-2005 11:06 AM

 
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 06-07-2008
Renjesh Renjesh is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 84
Question I want a small change in my script

Hi All,

I have a script like this which read a file and take data with file seperator ,
and it is working fine for only one line.If i am giving two line of data in this file it is taking the second line only.Can anyone help me to solve the problem.My aim is to read the file each line by line.

The file entry is something like

10.99.7.110,KBL18031,/dir1,/dir2
10.99.6.154,KBL02012,/dir1/dir2

script is like this ....

while read inputline
do
ATMIP="$(echo $inputline |cut -d, -f1)"
ATMNAME="$(echo $inputline |cut -d, -f2)"
ATMDIR1="$(echo $inputline |cut -d, -f3)"
ATMDIR2="$(echo $inputline |cut -d, -f4)"

done < testdetails.conf
 

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 10:33 AM.


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