Register
It is currently Thu Oct 30, 2014 6:03 pm

typing ^A in shell


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Thu Mar 27, 2008 12:23 am   

Joined: Thu Mar 27, 2008 12:19 am
Posts: 1
I have a file seperated with ^A


how do i type the char '^A' to do an awk operation

cat file.txt|awk -F'^A' '{print $1}'


Top
 Profile YIM  
 PostPosted: Fri Aug 08, 2008 6:38 pm   

Joined: Fri Aug 08, 2008 5:37 pm
Posts: 3
You need to escape control characters in the shell by preceding them with a control-V (CTL-V).
This definitely works if in vi instead of emac mode of bash edits.
For example, type:
Code:
cat file.txt | awk -F'CTL-V CTL-A' '{print $1}
'


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP