10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which comes every day and the file data look's as below.
Vi abc.txt
a|b|c|d\n
a|g|h|j\n
Some times we receive the file with only a new line character in the file like
vi abc.txt
\n (8 Replies)
Discussion started by: rak Kundra
8 Replies
2. Shell Programming and Scripting
Hi all..
I have a text file which looks like below:
abcd
efgh
ijkl
(blank space)
I need to remove only the last (blank space) from the file. When I try wc -l the file name,the number of lines coming is 3 only, however blank space is there in the file.
I have tried options like... (14 Replies)
Discussion started by: Sathya83aa
14 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone
I have a file where CP occurs both within each line and at the very end:
dwer 17 knsdask= * CP hwla 17 h'wopie un CP
I would like to separate the line on the first CP to get:
dwer 17 knsdask= * CP
hwla 17 h'wopie un CP
What I have so far is:
awk '{for (x=1; x<NF; x++)
... (5 Replies)
Discussion started by: meet77
5 Replies
4. UNIX for Dummies Questions & Answers
Hi,
i have a file where the end-of-file might be at the end of of a valid text line or on a new line
case a)
p q r
s t u <eof>
case b)
p q r
s t u
<eof>
case c)
p q r
s t u
<no data, only carriage return>
<eof>
I have a requirement where <eof> line should not be read if it's... (3 Replies)
Discussion started by: ysrini
3 Replies
5. UNIX for Dummies Questions & Answers
variable="unix\nlinux"
echo $variable
expected output:
unix
linux
:wall: can i do that ??
thanks in advance!! (3 Replies)
Discussion started by: sathish92
3 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone!
This is my very first post, sorry if I'm not posting in the right category.
I'm trying to match a newline "/n" using lex/yacc.
For example,
print(9,'\n',8)
should print
9
8
now do I write a regular expression to match exactly " '\n' "
Thanks! (1 Reply)
Discussion started by: code21
1 Replies
7. Programming
Hi ,
We have developed a grammer for our domain language using lex n yacc.
I want to know is there any pre defined lex-yacc function which gets call before executing any rule (or rules).
Oue requirement is, before processing any rule ,we want to perform some specific actions ?
is there... (0 Replies)
Discussion started by: supritjain
0 Replies
8. UNIX for Dummies Questions & Answers
hi,
I have a for loop where in I write some file name to another file.
I want to write all the filenames to another without any newlines. how can i avoid getting new lines with echo?
Thanks,
Srilaxmi (2 Replies)
Discussion started by: srilaxmi
2 Replies
9. UNIX for Dummies Questions & Answers
hi,
I want to print the below lines
"Message from bac logistics
The Confirmation File has not been received."
When i give like this in the code
"Message from bac logistics\n The Confirmation File has not been received."
It is giving only
Message from bac logistics\n The... (9 Replies)
Discussion started by: trichyselva
9 Replies
10. Linux
Hi,
I need to read one chinese char using lex. I tried using "." ( period ) for pattern matching but in vain.
Could anyone suggest me how do i proceeed.
Sample pgm: to read a chinese char in single quotes.
%{
#include <locale.h>
%}
%%
\'.\' printf("SUCCESS\n");
. ... (0 Replies)
Discussion started by: suman_jakkula
0 Replies