05-17-2010
Merci beaucoup Jean-Pierre !
My gawk-guide wasn't specific enough ... it suggested "0x" instead of "\x", but I guess that's only for hexadecimal to decimal conversions, not for manipulating ascii.
jos
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a record in a file that ends with the new line character "\n". How dio I determine the hexadecimal value for that? (2 Replies)
Discussion started by: lesstjm
2 Replies
2. Shell Programming and Scripting
#cat BATCH007.TXT
01,661060052,061000104,081118,0915,07,80,1,2/
99,,,2/
I have this file called BATCH007.TXT. I am trying to change fields 2 and 3 on line 2 to have zeroes. Like this:
01,661060052,061000104,081118,0915,07,80,1,2/
99,0,0,2/
I can use these commands to print identify the... (2 Replies)
Discussion started by: ddurden7
2 Replies
3. Shell Programming and Scripting
Hi
I have written a script for automating a program. There is a string in 2 lines that needs altering from input.
The 2 lines are:
prepare_flexreceptor4.py -r rec_rigid.pdbqt -s TYR119_TRP312 -x rec_flex.pdbqt
and
prepare_flexdocking4.py -l ind.pdbqt -r rec_flex.pdbqt -s TYR119_TRP312... (3 Replies)
Discussion started by: gav2251
3 Replies
4. Shell Programming and Scripting
Hi there!
I'm new in this and probably is a quite simple task but I still cannot manage to do it:
I have to read some files line by line and then change the input format into another one, but the very first step is to replace the empty variables by error values. I mean, each line looks like:... (2 Replies)
Discussion started by: thoreman
2 Replies
5. Shell Programming and Scripting
Hello Masters,
I have two subtitles file with different language like below
First file :
1
00:00:41,136 --> 00:00:43,900
2
00:00:55,383 --> 00:00:58,477
<i> Ladies and gentlemen,</i>
<i>this is Simon Barsinister,</i>
3
00:00:58,553 --> 00:01:00,521
<i>the wickedest man in the... (8 Replies)
Discussion started by: rk4k
8 Replies
6. Shell Programming and Scripting
I have a string and want to replace the / with a space.
For example having "SP/FS/RP" I want to get "SP FS RP"
However I am having problems using gsub
set phases = `echo $Aphases | awk '{gsub(///," ")}; {print}'` (5 Replies)
Discussion started by: kristinu
5 Replies
7. UNIX for Dummies Questions & Answers
This may be a repetitive or simple question, but I have a long running code, which uses a grep with a big argument, and i was wondering if there was a way to replace all of my greps with awk....here are my two commands using greps.
x=$(ls /my/directory/here | grep -h ".$variable")
and
... (1 Reply)
Discussion started by: jgrosecl
1 Replies
8. UNIX for Dummies Questions & Answers
I am trying to replace
javascript:top.showarticle('geo',1985,'with
../../abstracts/geo1985/I am using awk but getting an error
awk -v s="javascript:top.showarticle('geo',1985,'" -v d="../../abstracts/geo1985/" '{gsub(s,d); print} ' geo50n12.html > geo50n12.html.tmp
Fixed it using
... (3 Replies)
Discussion started by: kristinu
3 Replies
9. Shell Programming and Scripting
how to replace grep with awk commands.
i have a code like:
grep -w $student $markfile|$subjectid
can similar code be written by replacing grep with awk.
Thanks in advance,
regards,
giri (6 Replies)
Discussion started by: girijan
6 Replies
10. Shell Programming and Scripting
Hello all,
I have data like
"1"|"My_name"|"My_Email"|"My_Last"|My_other"
"2"|"My_name"|"My_Email"|"My_Last"|My_other"
"3"|"My_name"|"My_Email"|"
"|My_other"
"1"|"My_name"|"My_Email"|"My_Last"|My_other"
Need output like
"1"|"My_name"|"My_Email"|"My_Last"|My_other"... (10 Replies)
Discussion started by: lokaish23
10 Replies
UNICODE(1) General Commands Manual UNICODE(1)
NAME
unicode - command line unicode database query tool
SYNOPSIS
unicode [options] string
DESCRIPTION
This manual page documents the unicode command.
unicode is a command line unicode database query tool.
OPTIONS
-h --help
Show help and exit.
-x --hexadecimal
Assume string to be a hexadecimal number
-d --decimal
Assume string to be a decimal number
-r --regexp
Assume string to be a regular expression
-s --string
Assume string to be a sequence of characters
-a --auto
Try to guess type of string from one of the above (default)
-mMAXCOUNT
--max=MAXCOUNT
Maximal number of codepoints to display, default: 20; use 0 for unlimited
-iCHARSET
--io=IOCHARSET
I/O character set. For maximal pleasure, run unicode on UTF-8 capable terminal and specify IOCHARSET to be UTF-8. unicode tries to
guess this value from your locale, so with properly set up locale, you should not need to specify it.
-cADDCHARSET
--charset-add=ADDCHARSET
Show hexadecimal reprezentation of displayed characters in this additional charset.
-CUSE_COLOUR
--colour=USE_COLOUR
USE_COLOUR is one of on off auto
--colour=on will use ANSI colour codes to colourise the output
--colour=off won't use colours.
--colour=auto will test if standard output is a tty, and use colours only when it is.
--color is a synonym of --colour
-v --verbose
Be more verbose about displayed characters, e.g. display Unihan information, if available.
-w --wikipedia
Spawn browser pointing to Wikipedia entry about the character.
USAGE
unicode tries to guess the type of an argument. For example, you can use any of the following to display information about U+00E1 LATIN
SMALL LETTER A WITH ACUTE (a):
unicode 00E1
unicode U+00E1
unicode a
unicode 'latin small letter a with acute'
You can specify a range of characters as argumets, unicode will show these characters in nice tabular format, aligned to 256-byte bound-
aries. Use two dots ".." to indicate the range, e.g.
unicode 0450..0520
will display the whole cyrillic and hebrew blocks (characters from U+0400 to U+05FF)
unicode 0400..
will display just characters from U+0400 up to U+04FF
BUGS
Tabular format does not deal well with full-width, combining, control and RTL characters.
SEE ALSO
ascii(1)
AUTHOR
Radovan Garabik <garabik @ kassiopeia.juls.savba.sk>
2003-01-31 UNICODE(1)