Search Results

Search: Posts Made By: figure20012
Forum: Red Hat 08-31-2012
10,518
Posted By figure20012
pass a variable line number to sed
num=10
sed -n '$num p' test.txt


sed -n '10 p' test.txt works

however i am putting the sed command in a loop and the line number is not static
Can someone please help me how to achive this.
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 06:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy