Sponsored Content
Top Forums Shell Programming and Scripting How to retain backslash in a line while reading a data file? Post 302453043 by easwam on Tuesday 14th of September 2010 12:19:34 AM
Old 09-14-2010
Thanks Scrutinizer, that was helpful.

But I also had to do echo -E $LINE, probably because of my shell default.

Code:
$cat t9.dat | while read -r LINE
> do
> echo -E $LINE
> done
type string1_t = utf8 string('\0');
type string2_t = utf8 string('\0');
type string3_t = utf8 string('\0');
type string4_t = utf8 string('\0');

how do I find out my SHELL default?

Thanks
Mani

Moderator's Comments:
Mod Comment Please use code tags instead of font or color formatting

Last edited by pludi; 09-14-2010 at 03:25 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using loop reading a file,retrieving data from data base.

Hi All, I am having trouble through, I am reading the input from tab delimited file containing several records, e.g. line1 field1 field2 field3 so on.. line2 field1 field2 field3 so on.. .. .. on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies

2. Shell Programming and Scripting

Shell Script -- problem reading backslash(\)!!

Hello! I am writing a program that reads a bunch of arguments from the command line,then read information from a file(passed as one of the arguments) and do some computation. The problem I am facing is when a backslash(\) is present as one of the arguments, suppose $ myprog \ abc xyz,the backslash... (2 Replies)
Discussion started by: rossi143
2 Replies

3. Shell Programming and Scripting

Reading data from a specific line in a text file

hello, I have got the following problem that I am hoping someone can help with please. 1. I have got the following text file (below) , the columns data are 'Test Day', 'Board', 'Betting Number'. TEXT FILE ============================================ 1 3 02-01-27-28-29-30 0 1... (1 Reply)
Discussion started by: jermaine4ever
1 Replies

4. Shell Programming and Scripting

Reading data from a specific line in a text file

Hello, I have a problem which is giving me headache for days, can some please help. Please see code and text fiel below. Please see text in red for the problem I am facing # Program gets an input x from user while read line ; do echo... (4 Replies)
Discussion started by: jermaine4ever
4 Replies

5. Shell Programming and Scripting

Reading data from different position of a line

I want help reading data from different position of a line cat filename | cut -c120-131 6263-6280 or cat filename | cut -c120-131 -c6263-6280 doesn't seem to work. Please help jak (2 Replies)
Discussion started by: jakSun8
2 Replies

6. Shell Programming and Scripting

retain last 1000 line in a file

I have large file with around 100k+ lines. I wanted to retain only the last 100 lines in that file. One way i thought was using tail -1000 filename > filename1 mv filename1 filename But there should be a better solution.. Is there a way I can use sed or any such command to change the... (9 Replies)
Discussion started by: nss280
9 Replies

7. Shell Programming and Scripting

[Solved] Problem in reading a file line by line till it reaches a white line

So, I want to read line-by-line a text file with unknown number of files.... So: a=1 b=1 while ; do b=`sed -n '$ap' test` a=`expr $a + 1` $here do something with b etc done the problem is that sed does not seem to recognise the $a, even when trying sed -n ' $a p' So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies

8. Shell Programming and Scripting

Reading text file, comparing a value in a line, and placing only part of the line in a variable?

I need some help. I would like to read in a text file. Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01. Is this possible? any help is appreciated. (2 Replies)
Discussion started by: xChristopher
2 Replies

9. UNIX for Beginners Questions & Answers

Reading a file line by line and print required lines based on pattern

Hi All, i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field. i am using centos 7 Operating system. want to read below file. # cat /tmp/d5 NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 Replies
fvwm-root(1)							   Fvwm Modules 						      fvwm-root(1)

NAME
fvwm-root - Sets the root window of the current X display to image SYNOPSIS
fvwm-root [--retain-pixmap|-r] [--no-retain-pixmap] [--dummy|-d] [--no-dummy] [--dither] [--no-dither] [--color-limit [ncolors] ] [--no- color-limit] [--help|-h|-?] [--version|-V] image_file DESCRIPTION
fvwm-root reads the image file specified in the command line and displays it in the root window. The supported image formats are XBM, XPM, PNG and SVG if appropriated libraries are compiled in. SVG rendering options (as described in the ICONS AND IMAGES section of the main fvwm documentation) can be utilized. OPTIONS
These command line options are recognized by fvwm-root: --retain-pixmap | -r Causes fvwm-root to retain and publish the Pixmap with which the background has been set (the ESETROOT_PMAP_ID and _XROOTPMAP_ID properties are used). This is useful for applications which want to use the root Pixmap on the background to simulate transparency (for example, Eterm and Aterm use this method). This option should also be used for the RootTransparent colorset option, refer to the COLORSETS section of fvwm(1). If this option is not used, fvwm-root sets the _XSETROOT_ID property to None, and some programs, like fvwm modules, may use this to update their background if the background is transparent (Transparent colorset). Note, a well behaved program, like fvwm, should listen to both _XSETROOT_ID and _XROOTPMAP_ID property changes and update itself correspondingly. However some programs listen only to one of them, so you should either use this option or not depending on what part is implemented by these programs. You should also use this option to get fast root-transparent menus in fvwm. --no-retain-pixmap This is a default. May be useful to explicitely force the default even if "--retain-pixmap" is specified earlier. --dummy | -d Causes fvwm-root NOT to set the background, but to only free a memory associated with the ESETROOT_PMAP_ID property (if any). In any case the _XSETROOT_ID property is set to None. --no-dummy This is a default. May be useful to explicitely force the default even if "--dummy" is specified earlier. --dither Causes fvwm-root to dither images for "smoother" rendition on displays with color depth of 16 or lower. This the defaut with color depth less or equal to 8. --no-dither Causes fvwm-root NOT to dither images. This is the default with color depth greater than 8. --color-limit ncolors Causes fvwm-root to limit its color use to ncolors (if specified). This option is taken in account only with color depth less or equal to 8 (and a TrueColor or GrayScale visual). The default is to use the same color limit as fvwm. So in normal situation this option is not useful. However, if fvwm use a private colors map, as fvwm-root always use the default colors map you should use this option for limiting colors correctly. If ncolors is not specified a default is used. --no-color-limit Causes fvwm-root NOT to limit its color use. --help Shows a short usage. --version Shows a version number. COMPATIBILITY
In the past this utility was called xpmroot. This name is still supported as a symlink. BUGS
Repeated use of fvwm-root with different xpm pixmaps will use up slots in your color table pretty darn fast. AUTHOR
Rob Nation Rewritten and enhanced by fvwm-workers. 3rd Berkeley Distribution 09 May 2010 (2.5.30) fvwm-root(1)
All times are GMT -4. The time now is 08:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy