09-05-2013
@pamu
This fails if there are more than on filed with "" before hit.
aa,"bb,rr","cc,aa",dd,ee gives aa,"bb,rr","LQcc,aa",dd,ee
Corret aa,"bb,rr","cc,aa",LQdd,ee
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey - my first post here, and I'm a total SED newb. I've looked around for previous help on this, but have so far been unsuccessful.
I have a program (AMStracker for OS X) that outputs data in the terminal. Output is in this form:
.
.
.
3 0 -75
3 0 -76
3 0 -77
... (4 Replies)
Discussion started by: c0nn0r
4 Replies
2. Programming
Hi,
fputc() will overwrite from the beginning of the target file.
How would I append characters to the target file's end instead?
Thanks. (3 Replies)
Discussion started by: enuenu
3 Replies
3. UNIX for Dummies Questions & Answers
Hi all
i am very new to shell scripting,hope u guys can help
i need to replace,sort and append character for the file that look like this:
1007032811010001000100000001X700026930409
1007032811010001000200000002X700026930409
1007032711020001000300000003X700026930409... (2 Replies)
Discussion started by: ashikin_8119
2 Replies
4. Shell Programming and Scripting
Hi,
i want to append a character '|' at end of each line of a file abc.txt.
for example if the file abc.txt conatins:
a|b|c
1|2|33
w|2|11
i want result file xyz.txt
a|b|c|
1|2|33|
w|2|11|
I know this is simple but sumhow i am not able to reach end of line.
its urgent, thanks for... (4 Replies)
Discussion started by: muaz
4 Replies
5. Shell Programming and Scripting
Hi All,
I am new to Shell scripting.. I have a task to parse the text file into csv format. more then half the things has done.
But the problem is when I use the sed command in shell script. it appends newline character at the end of the line. and so when I open the file in CSV it's format... (3 Replies)
Discussion started by: Gaurang033
3 Replies
6. Shell Programming and Scripting
Hello all,
I have a stumper of a problem. I am trying to append a ^M or "newline" to the end of each 129 character string in a huge file in unix.
Each string starts with A00.
I am trying to get the file to go from...
A00vswjdv1 Test Junk Junk A00vswjdv2 Test Junk Junk ... (6 Replies)
Discussion started by: Captain
6 Replies
7. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
8. Shell Programming and Scripting
Hi Experts,
Is there a way to find a string in a file then append a character to that string then save the file or save to another file.
Here is an example.
>cat test.txt
NULL
NULL
NULL
9,800.00
NULL
1,234,567.01
I want to find all NON NULL String and add a dollar sign to those... (9 Replies)
Discussion started by: brichigo
9 Replies
9. UNIX for Beginners Questions & Answers
I have a huge file which contains multiple lines. It need to check whether character length is not more than 255 each line. If its not then it should remove the
character up to column. I have described in the output below. If its more than that
the next line should start with call but if the... (1 Reply)
Discussion started by: JoshvaPeter
1 Replies
10. Shell Programming and Scripting
Hi,
could you help me in processing this file under bash?
I need to add some text to the first line and then append the last element of the second columns.
The input file is tab separated while the output should be space separated.
input file is
1.00E-02 2.00E-02 4.465E+17
2.00E-02 3.00E-02... (4 Replies)
Discussion started by: f_o_555
4 Replies
ACTIVE(5) File Formats Manual ACTIVE(5)
NAME
active, active.times - list of active Usenet newsgroups
DESCRIPTION
The file /var/lib/news/active lists the newsgroups that the local site receives. Each newsgroup should be listed only once. Each line
specifies one group; their order in the file does not matter. Within each newsgroup, articles are assigned unique names, which are mono-
tonically increasing numbers.
If an article is posted to newsgroups not mentioned in this file, those newsgroups are ignored. If no valid newsgroups are specified, the
article is filed into the newsgroup ``junk'' and only propagated to sites that receive the ``junk'' newsgroup.
Each line consists of four fields specified by a space:
name himark lomark flags
The first field is the name of the newsgroup. The second field is the highest article number that has been used in that newsgroup. The
third field is the lowest article number in the group; this number is not guaranteed to be accurate, and should only be taken to be a hint.
Note that because of article cancellations, there may be gaps in the numbering sequence. If the lowest article number is greater then the
highest article number, then there are no articles in the newsgroup. In order to make it possible to update an entry in-place without
rewriting the entire file, the second and third fields are padded out with leading zeros to make them a fixed width.
The fourth field can contain one of the following flags:
y Local postings are allowed
n No local postings are allowed, only remote ones
m The group is moderated and all postings must be approved
j Articles in this group are not kept, but only passed on
x Articles cannot be posted to this newsgroup
=foo.bar Articles are locally filed into the ``foo.bar'' group
If a newsgroup has the ``j'' flag, then no articles will be filed into that newsgroup and local postings to that group should not be gener-
ated. If an article for such a newsgroup is received from a remote site, it will be filed into the ``junk'' newsgroup if it is not cross-
posted. This is different from not having a newsgroup listed in the file because sites can subscribe to ``j'' newsgroups and the article
will be propagated to them.
If the fourth field of a newsgroup starts with an equal sign, then the newsgroup is an alias. Articles can be posted to the group, but
will be treated as if they were posted to the group named after the equal sign. The second and third fields are ignored. Note that the
Newsgroup header is not modified (Alias groups are typically used during a transition, and are typically created with ctlinnd(8)). An
alias newsgroup should not point to another alias.
The file /var/lib/news/active.times provides a chronological record of when newsgroups are created. This file is normally updated by
innd(8) whenever a ctlinnd ``newgroup'' command is done. Each line consist of three fields:
name time creator
The first field is the name of the newsgroup. The second field is the time it was created, expressed as the number of seconds since the
epoch -- i.e., a time_t; see gettimeofday(2). The third field is the electronic mail address of the person who created the group.
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.13, dated 1996/10/29.
SEE ALSO
ctlinnd(8), innd(8).
ACTIVE(5)