![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to read and write a random row from a file? | sashankkrk | UNIX for Dummies Questions & Answers | 9 | 05-13-2008 04:26 AM |
| How to read and write directory or file contents in c++ ? | namrata5 | High Level Programming | 3 | 09-28-2007 12:58 PM |
| sed to read and write to very same file | 435 Gavea | Shell Programming and Scripting | 5 | 06-29-2006 08:04 PM |
| popening for read and write | szzz | High Level Programming | 1 | 11-18-2003 09:05 AM |
| read, write & STDOUT_FILENO.... | M3xican | High Level Programming | 2 | 07-17-2002 01:41 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
read and write from a file
I have tried to show the file name whose size is greater than 200 byte in current directory.
Please help me. ls -l | tr -s " " " " | cut -f 5,9 -d " " >out.txt #set -a x `cat out.txt` i=0 `cat out.txt` | while [ $i -le 5 ] do read x echo $x #re=200 j=0 if [ "${x[$j]}" < "200" ] then echo $j j=`expr $j + 1` echo ${x[$j]} fi i=`expr $i + 1` done |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Try the find command with the option -size.
Regards |
|
#3
|
|||
|
|||
|
awk
Hi,
Is follow one ok for you,pls try. Code:
ls -l | awk '$5>200' |
|||
| Google The UNIX and Linux Forums |