Hello,
I have file that looks like this :
Code:
765327564:line1
94:line2
7865:line3
.....
765322:linen
I want to cut all the digits from the beginning of each line up to ":" character and to have everything like this :
Code:
line1
line2
line3
.....
linen
P.S : content of line1 ...
Hello,
I've been stuck with this for a few days now :wall:, so I'm hoping someone out there might be kind enough to help me.
I need to do a "file exist" check with a variable in the file name. After that I need to do a line count on the file, and output its results to a txt file.
For simplicity/compliance reasons, I have simplified all my paths and file names.
Hi ,
I've got a file whose last characters are \n"\n (line feed characters)
I'd like to change this to \n , i.e suppress character " and one line feed.
I tried : sed --in-place -e "s/\n\"\n/\n/g" 1131422.xml but it seems to do nothing.
I'm on Ubuntu 12.04 Server.
Thank you for helping
Hi All, I have a file. This file contain huge amount of data. I want to modify this file. I want enter new line when count of "~ character is 79.
Hi, i need to read a line from a file and count the number of times it appear in, then continuous to the second line with the same.
i have something like this
Code:
tablesName="abc def hij akn ...
Hi,
I need to parse input file from 2nd line.
Input file contents are,
Code:
ABC123;20100913115432;2000000;NO;
04;AAA;09;DDD;601020304;AAAA;1;OPTA1;OPTA2;;;
04;BBB;09;BBB;601020304;BBBB;0;OPTB1;OPTB2;OPTB3;OPTB4;OPTB5;
04;CCC;09;DDD;601020304;CCCC;1;;;;;
For each line,
1] I need to check number of fields should be 12 and check 7th field value.
Code:
fields=$(IFS=\;; set -- $line; echo $#)
I am a newbie in Linux and I am having trouble with a piece of data on hand.
The source data is like
Code:
a|b|c|d
e|f|g
|h
i|j|k|l
m|n|o
|p
1|2|3|4
5|6|7|
8
a|b|c|d
e|f|g|h
For each line, there should be 4 fields separated by the "|", but unfortunately there are unexpected line breaks that make it a mess.
Hi All,
I am creating a text file using perl. The first record I am writing as "$line" and all the other as "\n$line". At the end the file is having N number of lines.