![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Displaying specific lines in a file. | MaestroRage | UNIX for Dummies Questions & Answers | 3 | 02-05-2008 04:57 PM |
| How to find number of lines in a file | somesh_p | Shell Programming and Scripting | 2 | 12-19-2007 09:15 PM |
| total number of lines in a file | Raynon | Shell Programming and Scripting | 9 | 10-04-2007 10:13 AM |
| cut a number of lines out of a file | networkfre@k | Shell Programming and Scripting | 1 | 12-09-2005 01:46 AM |
| Need ls to show number of lines in each file | GMMike | UNIX for Dummies Questions & Answers | 1 | 11-19-2004 05:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Displaying number of lines from file
Hi,
I am using below command to display the number of line, but its returning no of lines along with file name. But i want only no of line in the variable p. Please help me on this? p=`wc -l "text file"` echo "$p" |
|
||||
|
Does this help?
Remove space obtained from oracle |
|
||||
|
Quote:
Code:
sed -n '$=' filename |
![]() |
| Bookmarks |
| Tags |
| shell script, shell scripting, shiva, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|