![]() |
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 |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Sed Help !
Hi,
I have a command in one of my shell script as below. sed -n "/^$a/,\$p" $home/abc.log $a and $home are variables. Not sure about $p. Can you please let me know what this command is exactly trying to do. Thanks in advance LM ![]() |
|
||||
|
Quote:
|
|
||||
|
Quote:
I dont think so. It will print all lines of the file between the line in the file that begins with the value of $a and the "$" - Last line of the file. Simply once the sed finds out the line which begins with the value of $a,it prints all lines from there to the end of the file. Example: Assuming the variable "a" is set to "the" ie a=the Quote:
Quote:
Thanks Nagarajan Ganesan |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|