Sponsored Content
Full Discussion: Unable to print "|" in echo
Top Forums Shell Programming and Scripting Unable to print "|" in echo Post 303019529 by svks1985 on Sunday 1st of July 2018 02:15:39 PM
Old 07-01-2018
Here is the complete output:

Code:
0000000  52  65  70  6f  72  74  20  4e  61  6d  65  7c  52  65  63  6f
           R   e   p   o   r   t       N   a   m   e   |   R   e   c   o
0000020  72  64  20  43  6f  75  6e  74  73  0a  4d  45  4d  42  45  52
           r   d       C   o   u   n   t   s  \n   M   E   M   B   E   R
0000040  5f  49  4e  43  5f  32  30  31  38  30  36  33  30  37  32  30
           _   I   N   C   _   2   0   1   8   0   6   3   0   7   2   0
0000060  30  32  2e  74  78  74  7c  32  35  34  31  39  32  39  0a  50
           0   2   .   t   x   t   |   2   5   4   1   9   2   9  \n   P
0000100  52  4f  56  49  44  45  52  5f  49  4e  43  5f  32  30  31  38
           R   O   V   I   D   E   R   _   I   N   C   _   2   0   1   8
0000120  30  36  33  30  36  33  39  32  34  2e  74  78  74  7c  35  38
           0   6   3   0   6   3   9   2   4   .   t   x   t   |   5   8
0000140  36  33  0a  50  52  4f  56  5f  43  4f  4e  54  52  41  43  54
           6   3  \n   P   R   O   V   _   C   O   N   T   R   A   C   T
0000160  5f  49  4e  43  5f  32  30  31  38  30  36  33  30  36  34  33
           _   I   N   C   _   2   0   1   8   0   6   3   0   6   4   3
0000200  30  30  2e  74  78  74  7c  35  32  35  32  39  36  0a  56  45
           0   0   .   t   x   t   |   5   2   5   2   9   6  \n   V   E
0000220  4e  44  4f  52  5f  49  4e  43  5f  32  30  31  38  30  36  33
           N   D   O   R   _   I   N   C   _   2   0   1   8   0   6   3
0000240  30  36  33  36  30  34  2e  74  78  74  7c  31  30  32  0a
           0   6   3   6   0   4   .   t   x   t   |   1   0   2  \n
0000257

---------- Post updated at 10:47 AM ---------- Previous update was at 09:40 AM ----------

Seems like I found the solution. Problem lies with the control file. It has \n (LF) between the lines. It should have \r\n (CR + LF).
This would work to convert the file:
Code:
awk '{printf "%s\r\n", $0}' CONTROL_FILE.txt

I would let you know how that goes.
Thanks RudiC for showing me the torch light :-)

---------- Post updated at 01:15 PM ---------- Previous update was at 10:47 AM ----------

Fixed the control file and still getting the same issue.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. SuSE

VMDB Failure" followed by "Unable to open snapshot file"

keep getting an error when I try to revert to a snapshot: "VMDB Failure" followed by "Unable to open snapshot file" Im using vmware server 1.0.4, host OS is windows xp and guest OS is SLES. Is there anything I can do to recover the snapshot or am I in trouble!?!?! (0 Replies)
Discussion started by: s_linux
0 Replies

3. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

4. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

5. Solaris

How to check "faulty" or "stalled" print queues - SAP systems?

Hi all, First off, sorry for a long post but I think I have no other option if I need to explain properly what I need help for. I need some advise on how best to check for "faulty" or "stalled/jammed' print queues. At the moment, I have three (3) application servers which also acts as print... (0 Replies)
Discussion started by: newbie_01
0 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. AIX

echo $varibla | mail -s "subject" "xxx@xxx.com" not ruuning as expected

Hi Folks, As per the subject, the following command is not working as expected. echo $variable | mail -s "subject" "xxx@xxx.com" Could anyone figure it out whats wrong with this. I am using AIX box. Regards, (2 Replies)
Discussion started by: gjarms
2 Replies

8. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

9. Shell Programming and Scripting

Why awk print is strange when I set FS = " " instead of FS = "\t"?

Look at the following data file(cou.data) which has four fields separated by tab. Four fields are country name, land area, population, continent where it belongs. As for country name or continent name which has two words, two words are separated by space. (Data are not accurately... (1 Reply)
Discussion started by: chihuyu
1 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy