Thursday, 14 August 2014

How to Replace characters at specified position and line in UNIX


sed -n -e 24p -e 24q | cut -c27-34
sed -n '24p;24q' | cut -c27-34
The -n option means 'do not print lines by default'; the 24p means print line 24; the 24q means quit after processing line 24. You could leave that out, in which case sed would continue processing the input, effectively ignoring it.

1 comments:

SharePoint Solution said...

SharePoint Solutions.NET is a virtual company provide SharePoint Services Globally. We offer a wide array of Services covering the entire range of Microsoft SharePoint capabilities.

Post a Comment