![]() |
|
|
|
|
|||||||
| 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 |
| Append string to columns from 2 files | karthikn7974 | Shell Programming and Scripting | 3 | 04-28-2008 06:32 AM |
| append a string to a grep result | melanie_pfefer | Shell Programming and Scripting | 8 | 03-19-2008 04:19 AM |
| Append using awk | Raynon | Shell Programming and Scripting | 4 | 11-04-2007 03:19 AM |
| perl: simple question on string append | the_learner | Shell Programming and Scripting | 1 | 05-14-2007 02:09 PM |
| Append string in all rows | Rock | Shell Programming and Scripting | 7 | 11-30-2006 11:46 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
append esc string
I have a request that is simple, but I can't figure out how to do it. I have a unix file that I want to append the following string to the front of the file
<esc>&l1O<esc>(0U<esc>(s0p16.66h8.5v0s0b0T and an <esc>E to the end. I know that I could do something like cat start_file report_file end_file > new_report_file However, I can't figure out how to save the ESCAPE character in the start and end file. I feel silly asking this, but I have never had to do it before. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
\033 is octal for ascii 27 esc. Try using this as a literal:
Code:
echo "\033&l1O\033(0U\033(s0p16.66h8.5v0s0b0T" > somefile cat somefile report_file > new_report_file |
|
#3
|
|||
|
|||
|
Thank you very much
|
|||
| Google The UNIX and Linux Forums |