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
assigning values to a variable trichyselva UNIX for Dummies Questions & Answers 3 12-14-2007 01:55 AM
Assigning Value of variable janemary.a Shell Programming and Scripting 2 05-11-2007 06:53 AM
Assigning a value to variable sirtrancealot Shell Programming and Scripting 3 07-15-2006 04:07 PM
Problem in assigning values to variables mohanprabu Shell Programming and Scripting 3 08-25-2005 05:44 AM
Assigning values to an array yongho UNIX for Dummies Questions & Answers 4 07-13-2005 09:49 PM

Closed Thread
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
  #1 (permalink)  
Old 05-19-2008
finalight finalight is offline
Registered User
  
 

Join Date: May 2008
Posts: 51
problem assigning values to variable

Date of Request: 20080514 10:37 Submitted By: JPCHIANG


i want to get the value "JPCHIANG" only in read a file, however, when i do this:
name=`"$line"|cut -d " " -f8`

it display all the line and append 'not found' at the end of the statement

the $line is actually a variable in a loop for reading line by line in a file.
  #2 (permalink)  
Old 05-19-2008
danmero danmero is online now Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,447

Code:
name=`echo "$line"|cut -d " " -f8`

  #3 (permalink)  
Old 05-19-2008
finalight finalight is offline
Registered User
  
 

Join Date: May 2008
Posts: 51
ok thanks a lot, it works
Closed Thread

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 09:04 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