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 backslash. Please advise. Below is the kind of script I want, but with the backslash retained. Thanks in advance.
Example BEGIN
Input File
Command line Script : Example segment
Note that the output above is missing the \ character.
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT OPENDARWIN
ioreg
IOREG(8) BSD System Manager's Manual IOREG(8)NAME
ioreg -- show I/O Kit registry
SYNOPSIS
ioreg [-b] [[-c class] [-l] [-n name]] [-p plane] [-s] [-S] [-w width] [-x]
DESCRIPTION
ioreg displays the I/O Kit registry. The use of the -c, -l, or -n options cause ioreg to show the properties of objects matching the speci-
fied criteria. By default, ioreg does not show the properties of an object.
The options are as follows:
-b Show the object name in bold.
-c Show the object properties only if the object is, or derives from, the specified class.
-l Show the object properties.
-n Show the object properties only if the object has the specified name.
-p Traverse the registry over the specified plane. The default plane value is ``IOService''. The other planes, such as ``IODeviceTree'',
can be found under the ``IORegistryPlanes'' property of the root object (ioreg -n Root).
-s Show the object state (busy state, retain count). This is the default.
-S Don't show the object state (busy state, retain count).
-w Clip the output to the specified line width. The default width value is the current screen size. A value of 0 specifies an unlimited
line width.
-x Print numeric property values in hexadecimal.
Darwin January 1, 2000 Darwin