10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
2. Shell Programming and Scripting
Hi,
I have a file like
$ cat abc
HDR XXX
content XXX
content YYY
content XXX
content YYY
content XXX
content YYY
TRL YYYI want to replace the lines staritng with HDR and TRL
For this I have written below code
#!/usr/bin/perl -w
use strict;
open ( FH , "+< abc" ) || die "Can't... (1 Reply)
Discussion started by: sam05121988
1 Replies
3. Shell Programming and Scripting
Hi friends,
Issue1:
I have a text file with the first line like this
#chrom start end Readcount_A Normalized_Readcount_A ReadcountB Normalized_Readcount_B Fc_A_vs_B pvalue_A_vs_B FDR_A_vs_B Fc_B_vs_A pvalue_B_vs_A FDR_B_vs_A <a href="http://unix.com/">Link</a>
How can I change it to the... (11 Replies)
Discussion started by: jacobs.smith
11 Replies
4. Shell Programming and Scripting
We have a huge file which has just one really large line; about 500 MB. I want to
1. Count all the occurrences of a phrase
2. Replace the phrase with another.
Trying to open it using vi has not helped as it complains that it is too large. Can any script help? Please advise.
Thank you, (12 Replies)
Discussion started by: kaushikadya
12 Replies
5. Shell Programming and Scripting
Hello All,
My file content is:
DROP TABLE
"FACT_WORLD";
CREATE TABLE "FACT_WORLD" (
"AR_ID" INTEGER NOT NULL,
"ORG_ID" INTEGER NOT NULL
)
DATA CAPTURE NONE
COMPRESS YES;
I want to change this file to have entries in one... (6 Replies)
Discussion started by: akash2508
6 Replies
6. Shell Programming and Scripting
How to edit file content at the specific line? For example at below
The things to edit --> This is line 2. And it is below line 1.
This is line 1.
This is line 2. # i want to append some words at this row line. How?
This is line 3. (8 Replies)
Discussion started by: alvin0618
8 Replies
7. Shell Programming and Scripting
Is there a way to edit a file without opening two files
the only method I know is
one file for reading from
and one file writing to
I cannot think of any other ways (4 Replies)
Discussion started by: 3junior
4 Replies
8. Shell Programming and Scripting
Hi,
sample file looks like this..
<hp>
<name>
<detail>adsg</detail>
...
...
</name><ft>4264</ft>
</hp>
I need to edit the last but one line using perl script. I want the format to be ..
<hp>
<name>
<detail>adsg</detail>
...
...
</name> (9 Replies)
Discussion started by: meghana
9 Replies
9. Shell Programming and Scripting
Greetings,
I have a file: hostnames.txt which has -
# cat hostnames.txt
machine1
machine2
I need the output to be saved to a variable as:
HOSTNAMELIST=machine1,machine2
Please advise.
Thanks,
Chiru (3 Replies)
Discussion started by: chiru_h
3 Replies
10. UNIX for Dummies Questions & Answers
I am trying to edit each line in a file. The file has several columns delimitted by '|'.
I need to take out the last two columns.
Each line starts with a unique word through which I am storing the lines in a variable and cutting the last two colums.
But, when I am echoing the line, it is... (2 Replies)
Discussion started by: chiru_h
2 Replies