10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I'd like to add the newline:
\tuser: nobody", or "<TAB>user: nobody
to all files named:
docker-compose.ymlin subfolders of pwd with names beginning with 10-20.
Within these files, I'd like to find the line (there'll only be one) containing:
command: celery workerNOTE: As far as... (2 Replies)
Discussion started by: duncanbetts
2 Replies
2. Shell Programming and Scripting
Greetings Experts,
I am in AIX; I have a file generated through awk after processing the input files. Now I need to replace or remove the new-line characters on all lines that doesn't have a ; which is the last character on the line. I tried to use sed 's/\n/ /g' After checking through the... (6 Replies)
Discussion started by: chill3chee
6 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. Shell Programming and Scripting
Hi,
I ve a file with name "check"
in this file "check" has two lines with contents
now how to read these files line by line..
i used the code
But these doesnt stop with two lines.. So how to set condition that only two lines be read and the program should stop its execution.. Please... (5 Replies)
Discussion started by: Priya Amaresh
5 Replies
5. Shell Programming and Scripting
sed 's|^xyz.abc *= *.*|xyz.abc=60|' /test/myFile.properties > /test/myFile.properties1
myFile.properties has the last line as xyz.abc=23 does not end with newline.
When I run this command the last line is truncated if there is no newline character at EOF. Looking for an alternative here. (1 Reply)
Discussion started by: sunn_hps
1 Replies
6. Shell Programming and Scripting
Hi ,
I am having an issue with the Awk script to insert newline for a regular expression match
Having a file like this
FILE1
####################
RXOER , RXERA , RXERC , RXERD
.RXEA(RXBSN), RXERD , REXCD
input RXEGT
buffer RXETRY
#######################
Want to match the RXE... (38 Replies)
Discussion started by: jaita
38 Replies
7. 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
8. Shell Programming and Scripting
Hi,
How to detect eof character in a data file? I am reading a data file generated from UNIX. I use java scanner, the scanner's hasNextLine() returns false in the middle of the file. I suspect there is a eof in the middle of the data file. Does anybody know how to check if a file contains eof... (1 Reply)
Discussion started by: redwing
1 Replies
9. Programming
Hi ,
I need to develop a parser which should match something like
1. text a=5 " a=20";
2. text a=..."
a=20";
3 text a=..."
a=20
b=34
c=12
";
I have used this regular expression in my Lex file to generate the tokens:
\".\s*.*\s.\" (8 Replies)
Discussion started by: vishwa787
8 Replies
10. Shell Programming and Scripting
Hi,
Please help me on this.
how to check if the file DOES NOT have EOF ??
I am using ksh for this. (3 Replies)
Discussion started by: BasavarajaKC
3 Replies