![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Convert two column data into 8 columns | NickC | Shell Programming and Scripting | 8 | 06-28-2008 12:19 PM |
| How to write data in column | c0384 | Shell Programming and Scripting | 8 | 07-28-2007 06:18 PM |
| Column data reading | FarhanNaseer | Shell Programming and Scripting | 1 | 09-19-2005 01:02 AM |
| glance RSS/VSS data column | xtrix | HP-UX | 0 | 01-17-2005 10:32 AM |
| Move data from Column to Row | danhodges99 | Shell Programming and Scripting | 4 | 05-19-2003 11:23 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Need to get the first column of data
Hello,
if i have a file with this in it: aaaa bbbb cccc dddd how can i read that file and move the first column only into a variable? i've been trying the cut command but can't seem to get it right, ie HTML Code:
wc all_flist_zp.out > wc.out
cut -b 1 wc.out > wc.out2
cat wc.out2
passvar=`cat wc.out2`
passvar=`echo $passvar | sed -e 's/^ *//' -e 's/ *$//'`
echo "passvar:" $passvar
echo $passvar
BobK |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|