10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Text file has DEL character(ASCII code 127) as quotes with comma as field delimiter. If any of the field contains new line character then I need to remove it. Please help me to achieve this.
Thanks
Vikram (4 Replies)
Discussion started by: Vikramhm
4 Replies
2. Shell Programming and Scripting
Assume the following 5 records (field separator is a space):
0903 0903 0910 0910 0910 0910 0910 0910 0917 0917 0917 0917 0924
1001 1001 1001 1001 1008 1008 1008 1008 1015 1015 1015 1015 1022
1029 1029 1029 1029 1105 1105 1105 1105 1112 1112 1112 1112 1119
1126 1126 1126 1126 1203 1203 1203 1203... (8 Replies)
Discussion started by: tree
8 Replies
3. Shell Programming and Scripting
My source file is pipe delimeted file with 53 fields.In 33 rd column i am getting mutlple new line characters,dule to that record is breaking into multiple records.
Note : here record delimter also \n
sample Source file with 6 fields :
1234|abc| \nabcd \n bvd \n cde \n |678|890|900\n
... (6 Replies)
Discussion started by: lakshmi001
6 Replies
4. Shell Programming and Scripting
I have
a='123, abc, def, ghi'
var1=`echo $a | awk -F", " '{print RS $1}'`
echo "something: $var1"
which outputs
something
123
how can I tell awk not to put a newline between fields? I want it to output:
something: 123 (4 Replies)
Discussion started by: unclecameron
4 Replies
5. Shell Programming and Scripting
Is there a simple way to select and replace characters based on character position in the line rather than as delimited columns?
I have input $FILE.1
0.9318 1.4966 0.6361 A
0.4709 -0.2878 -0.5030 Bb
-0.5738 -1.3981 0.8936 C
And desire output $FILE.2
A ... (4 Replies)
Discussion started by: Alchemy3083
4 Replies
6. Shell Programming and Scripting
Hello,
I am currently trying to edit an ldif file. The ldif specification states that a newline followed by a space indicates the subsequent line is a continuation of the line. So, in order to search and replace properly and edit the file, I open the file in textwrangler, search for "\r " and... (14 Replies)
Discussion started by: rowie718
14 Replies
7. Shell Programming and Scripting
I found that when I used a variable to receive the result from a command execution, the newline characters were removed from the variable.
For example, I ran
$ ret=`ls -l`
$ echo $ret
Then, I saw:
total 40 -rw-r--r-- 1 testtrunk testtrunk 0 Dec 13 11:13 pk -rw-rw-r-- 1 testtrunk... (2 Replies)
Discussion started by: pankai
2 Replies
8. Shell Programming and Scripting
Hello ,
I have the folowing scenario :
I have a text file as follows : (say name.txt)
ABC
DEF
XYZ
And I have one more xml file as follows : (say somexml.xml)
<Name>ABC</Name>
<Age>12</Age>
<Class>D</Class>
<Name>XYZ</Name>
<Age>12</Age>
<Class>D</Class>
<Name>DEF</Name>... (7 Replies)
Discussion started by: shweta_d
7 Replies
9. Shell Programming and Scripting
Hi Everybody,
I need some help on formatting the files coming into unix box on the fly.
I get a file some thing like this in a single line.
ISA^M00^M ^M00^M ^M14^M006929681900 ^M01^M095449419 ... (5 Replies)
Discussion started by: ntekupal
5 Replies
10. AIX
Hi ppl.
I have to check for duplicate files in a directory .
the directory has following files
/the/folder /containing/the/file
a1.yyyymmddhhmmss
a1.yyyyMMddhhmmss
b1.yyyymmddhhmmss
b2.yyyymmddhhmmss
c.yyyymmddhhmmss
d.yyyymmddhhmmss
d.yyyymmddhhmmss
where the date time stamp can be... (1 Reply)
Discussion started by: asinha63
1 Replies