Sponsored Content
Top Forums Shell Programming and Scripting gawk (dos) insert backslash at end of line Post 302532298 by Corona688 on Monday 20th of June 2011 01:50:24 PM
Old 06-20-2011
How about:

Code:
var=sprintf("%c", 0134);

where 0134 is the octal value of a backslash. Then you can use that var wherever you like. print var "stuff" prints \stuff
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can I insert character to end of file?

Hello all How can I insert character to the end of text file without opening it in vi Just simple one liner, can it be done? Tnx (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

Insert two strings at the beginning and at the end of each line of a file

Hi, excuse me for my poor english. My problem is that: I have a File i want to add to each line of that file two strings: one at the beginning of the line, one at the ending. string1="abcd" string2="efgh" i want $string1 content $string2 for each line. Is that possible? (3 Replies)
Discussion started by: Linux-fueled
3 Replies

3. UNIX for Dummies Questions & Answers

insert period at the end of each line

file1 contains: this is a test this is a test and only a test this is another test this is another test and only another only i'd like my file to look like this: this is a test. this is a test and only a test. this is another test. this is another test and only another only. (6 Replies)
Discussion started by: tjmannonline
6 Replies

4. Shell Programming and Scripting

insert text at every end of the line

Hi, I just wanted to know if you have any idea or script to insert a text at everyend of the line, the text will vary. for example sample: this is line1 ok this is line2 ok this is line3 ok output: this is line1 ok /home/line1.txt this is line2 ok /home/line2.txt this is line3 ok... (6 Replies)
Discussion started by: invinzin21
6 Replies

5. Shell Programming and Scripting

How to retain backslash in a line while reading a data file?

Hello Firends I have a file that contains data within single quotes, which has meaning of its own. When I am trying to parse through the file for a different functionality I noticed that I was loosing the backslash when occurrences in the file look like ('\0'). I would want to retain the... (3 Replies)
Discussion started by: easwam
3 Replies

6. Shell Programming and Scripting

How to disable backslash in command line

Dear I have one problem in SCO Unix command line. I want to disable execution of commands with backslash. For example - if the user executes the following command \exec_script Here - i want the system should NOT execute this command. Can any one give me a suitable... (8 Replies)
Discussion started by: subbu62
8 Replies

7. Shell Programming and Scripting

Redirect output directly with DOS end of line

Hi guys, I have some echo scripts and awk scripts like these: echo "some text" > output1 . . awk '{....}{print}' input > output2Both output1 and output2 are saved with unix END Of Line, then, is there an option to include within echo command and awk command to save the output as DOS END Of... (3 Replies)
Discussion started by: Ophiuchus
3 Replies

8. UNIX for Dummies Questions & Answers

Replace backslash at the end of the string using sed command

I have text file which is a tab delimited one. Sample data from the file is shown below: unix is\ great\ os linux\ is superb I want to replace that backslash with empty string preserving the tab delimiter. Output should be unix is great os linux is ... (3 Replies)
Discussion started by: p.akhilreddy4u
3 Replies

9. UNIX for Dummies Questions & Answers

insert string at end of line if it found from list

Hi all, can some one help me out file 1 i have 06/01 3:14 d378299 06/01 8:10 d642036 06/01 10:51 d600441 06/01 10:52 d600441 06/01 11:11 d607339 06/01 11:49 d398706 something like this and in file named list i have ( there is space btwn 06/01 and 11:49 and d398706) d607339... (5 Replies)
Discussion started by: zozoo
5 Replies

10. Shell Programming and Scripting

Gawk --- produce the output in pattern space instead of END space

hi, I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
libcaca DOS conio.h compatibility layer(3caca)			      libcaca			    libcaca DOS conio.h compatibility layer(3caca)

NAME
libcaca DOS conio.h compatibility layer - Functions __extern char * caca_conio_cgets (char *str) DOS conio.h cgets() equivalent. __extern void caca_conio_clreol (void) DOS conio.h clreol() equivalent. __extern void caca_conio_clrscr (void) DOS conio.h clrscr() equivalent. __extern int caca_conio_cprintf (const char *format,...) DOS conio.h cprintf() equivalent. __extern int caca_conio_cputs (const char *str) DOS conio.h cputs() equivalent. __extern int caca_conio_cscanf (char *format,...) DOS stdio.h cscanf() equivalent. __extern void caca_conio_delay (unsigned int) DOS dos.h delay() equivalent. __extern void caca_conio_delline (void) DOS conio.h delline() equivalent. __extern int caca_conio_getch (void) DOS conio.h getch() equivalent. __extern int caca_conio_getche (void) DOS conio.h getche() equivalent. __extern char * caca_conio_getpass (const char *prompt) DOS conio.h getpass() equivalent. __extern int caca_conio_gettext (int left, int top, int right, int bottom, void *destin) DOS conio.h gettext() equivalent. __extern void caca_conio_gettextinfo (struct caca_conio_text_info *r) DOS conio.h gettextinfo() equivalent. __extern void caca_conio_gotoxy (int x, int y) DOS conio.h gotoxy() equivalent. __extern void caca_conio_highvideo (void) DOS conio.h highvideo() equivalent. __extern void caca_conio_insline (void) DOS conio.h insline() equivalent. __extern int caca_conio_kbhit (void) DOS conio.h kbhit() equivalent. __extern void caca_conio_lowvideo (void) DOS conio.h lowvideo() equivalent. __extern int caca_conio_movetext (int left, int top, int right, int bottom, int destleft, int desttop) DOS conio.h movetext() equivalent. __extern void caca_conio_normvideo (void) DOS conio.h normvideo() equivalent. __extern void caca_conio_nosound (void) DOS dos.h nosound() equivalent. __extern int caca_conio_printf (const char *format,...) DOS stdio.h printf() equivalent. __extern int caca_conio_putch (int ch) DOS conio.h putch() equivalent. __extern int caca_conio_puttext (int left, int top, int right, int bottom, void *destin) DOS conio.h puttext() equivalent. __extern void caca_conio__setcursortype (int cur_t) DOS conio.h _setcursortype() equivalent. __extern void caca_conio_sleep (unsigned int) DOS dos.h sleep() equivalent. __extern void caca_conio_sound (unsigned int) DOS dos.h sound() equivalent. __extern void caca_conio_textattr (int newattr) DOS conio.h textattr() equivalent. __extern void caca_conio_textbackground (int newcolor) DOS conio.h textbackground() equivalent. __extern void caca_conio_textcolor (int newcolor) DOS conio.h textcolor() equivalent. __extern void caca_conio_textmode (int newmode) DOS conio.h textmode() equivalent. __extern int caca_conio_ungetch (int ch) DOS conio.h ungetch() equivalent. __extern int caca_conio_wherex (void) DOS conio.h wherex() equivalent. __extern int caca_conio_wherey (void) DOS conio.h wherey() equivalent. __extern void caca_conio_window (int left, int top, int right, int bottom) DOS conio.h window() equivalent. Detailed Description These functions implement DOS-like functions for high-level text operations. Author Generated automatically by Doxygen for libcaca from the source code. Version 0.99.beta18 Fri Apr 6 2012 libcaca DOS conio.h compatibility layer(3caca)
All times are GMT -4. The time now is 03:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy