Sponsored Content
Top Forums Shell Programming and Scripting Preserve extented ascii character when run echo comand inside bash script Post 302569142 by Ophiuchus on Saturday 29th of October 2011 06:06:41 PM
Old 10-29-2011
Hi binlib,

The hexa print out I show in my previous post, I see it in display.

I'm not sure if od command will produce a readable output showing correctly the extended ascii character or how it works.

Thanks for help so far.

---------- Post updated at 06:06 PM ---------- Previous update was at 05:53 PM ----------

Quote:
Originally Posted by fpmurphy
You need to change your locale to a french locale. man locale for further information.
Hi fpmurphy,

What I'm confuse is why if I sent the echo script alone the output with extended ascii characters is correct, but when the
echo script is part of a more large script as in my example, in the output the extended ascii characters are not printed.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

run a shell script with echo

I need to schedule a shell script that runs at the command prompt to run with crontab. When I run this at the command prompt as follows it works: echo /usr/test/script.sh date1 date2 y | at 20:00 But if I will pass these argument (date1, date2, Y) with in a shell script (say scr1.sh) and... (7 Replies)
Discussion started by: keerthi
7 Replies

2. Shell Programming and Scripting

Problem in executing a comand liying inside a variable

Hi everyone! I need some help with my shell script :( I am sending a shell command from a html text input to a cgi. Then, I store it into a variable. For example var="ps -axu" echo `$var` This functions properly. But consider the following... var="ps -axu | grep root" Now, I want... (2 Replies)
Discussion started by: Nene
2 Replies

3. UNIX for Advanced & Expert Users

Processing extended ascii character file names in UNIX (BASH scipts)

Hi, I have a accentuated letter (ö) in a script for an Installer. It's a file name. This is not working and I'm told to try using the octal value for the extended ascii character. Does anyone no how to do this? If I had the word "filförval", can I just put in the value between the letters, like... (9 Replies)
Discussion started by: peli
9 Replies

4. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

5. Shell Programming and Scripting

Bash- Command run from script does not pass full parameters with spaces inside

There's a JavaScript file that I call from command line (there's a framework) like so: ./RunDiag.js param1:'string one here' param2:'string two here' I have a shell script where I invoke the above command. I can run it in a script as simple as this #!/bin/bash stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies

6. Shell Programming and Scripting

Preserve value between different run of script.

I have a script that test for server up status. I need to preserve the value of status between every run of the script. test.sh log=$(cat /tmp/log_status) start loop test for servers print status for munin etc test=$(echo -e "${test}${status},") end loop echo $test >... (4 Replies)
Discussion started by: Jotne
4 Replies

7. Shell Programming and Scripting

Preserve commas inside double quotes (perl)

Hi, I have an input file like this $ cat infile hi,i,"am , sam", y hello ,good, morning abcd, " ef, gh " ,ij no, "good,morning", yes, "good , afternoon" from this file I have to split the fields on basis of comma"," however, I the data present inside double qoutes should be treated as... (3 Replies)
Discussion started by: sam05121988
3 Replies

8. Shell Programming and Scripting

Preserve spaces while reading character character

Hi All, I am trying to read a file character by character, #!/bin/bash while read -n1 char; do echo -e "$char\c" done < /home/shak/testprogram/words Newyork is a very good city. Newyorkisaverygoodcityforliving I need to preserve the spaces as thats an... (3 Replies)
Discussion started by: Kingcobra
3 Replies

9. Shell Programming and Scripting

Run bash command inside zsh script

Hi, I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh). I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory " eve though I merged the whole... (7 Replies)
Discussion started by: kamcamonty
7 Replies

10. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies
NROFF(1)						      General Commands Manual							  NROFF(1)

NAME
nroff - emulate nroff command with groff SYNOPSIS
nroff [ -CchipStUv ] [ -dcs ] [ -Mdir ] [ -mname ] [ -nnum ] [ -olist ] [ -rcn ] [ -Tname ] [ file ... ] DESCRIPTION
The nroff script emulates the nroff command using groff. Only ascii, latin1, utf8, and cp1047 are valid arguments for the -T option, selecting the output encoding emitted by grotty, groff's TTY output device. If an invalid or no -T option is given, nroff checks the cur- rent locale to select a default output device. It first tries the locale program, then the environment variables LC_ALL, LC_CTYPE, and LANG, and finally the LESSCHARSET environment variable. The -h and -c options are equivalent to grotty's options -h (using tabs in the output) and -c (using the old output scheme instead of SGR escape sequences). The -d, -C, -i, -M, -m, -n, -o, and -r options have the effect described in troff(1). In addition, nroff silently ignores the options -e, -q, and -s (which are not implemented in troff). Options -p (pic), -t (tbl), -S (safer), and -U (unsafe) are passed to groff. -v shows the version number. ENVIRONMENT
GROFF_BIN_PATH A colon separated list of directories in which to search for the groff executable before searching in PATH. If unset, `/usr/bin' is used. NOTES
This shell script is basically intended for use with man(1), so warnings are suppressed. nroff-style character definitions (in the file tty-char.tmac) are also loaded to emulate unrepresentable glyphs. SEE ALSO
groff(1), troff(1), grotty(1) Groff Version 1.19.2 12 April 2005 NROFF(1)
All times are GMT -4. The time now is 05:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy