10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file similar to the below. I am selecting only the paragraphs with @inlineifset.
I am using the following command
sed '/@inlineifset/,/^ *$/!d;
s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln
This produces
@section Correlations between
seismograms,,,,}}
... (5 Replies)
Discussion started by: Danette
5 Replies
2. Shell Programming and Scripting
Hi all,
I have about 1.8 million files in a directory structre, that contain a ? on the end, for example:
/testdocs/1/mar/08/08/images/user/{1234-1234-1234-1234}0?
Is there a way to go through the testdocs folder, recursively, and remove the ? from all docs that have one on the end?
... (11 Replies)
Discussion started by: tirmUK
11 Replies
3. Shell Programming and Scripting
Hello Gurus,
I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file.
1|ABC DEF|100|10
2|PQ
RS
T|200|20
3| UVWXYZ|300|30
4| GHIJKL|400|40... (7 Replies)
Discussion started by: dJHa
7 Replies
4. UNIX for Dummies Questions & Answers
Hi
I would like to rename Multiple files in a Unix Directory using Ksh Command.
Eg ATT8-2011-10-01 00:00:00-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF
needs to be renamed as
ATT8-2011-10-01-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF
Basically the time... (2 Replies)
Discussion started by: pchegoor
2 Replies
5. Shell Programming and Scripting
It is very simple to remove a hyphen from a word anywhere in that word using a simple sed command (sed -i 's/-//g' filename), but I am not able to figure out how to do this:
For example,
apple
-orange
tree
pipe-
banana-shake
dupe-
What my output should look like:
apple
orange
tree... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
6. Shell Programming and Scripting
Hi,
I have multiple files having many lines like as bvelow:
file Name a.txt
abc def
def xyz
123 5678
file Name b.txt
abc def
def xyz
123 5678
I would like to append files in the below format to a new file:
file Name c.txt (7 Replies)
Discussion started by: rramkrishnas
7 Replies
7. Shell Programming and Scripting
Hi,
I was trying to remove the blank from beginning of a line.
when I try:
sed 's/^ +//' filename
it does not work
but when I try
sed 's/^ *//' filename
it works
But I think the first command should have also replaced any line with one or more blanks.
Kindly help me in understanding... (5 Replies)
Discussion started by: babom
5 Replies
8. UNIX for Dummies Questions & Answers
Hey everyone, I have a question about comparing two files. I have two lists of files. The first list, todo.csv, lists a series of compounds my supervisor wants me to perform calculations on. The second list, done.csv, lists a series of compounds that I have already performed calculations on.... (2 Replies)
Discussion started by: Stuart Ness
2 Replies
9. Shell Programming and Scripting
A have a file
npt02-sr40-syn-dc0p014-32x24drw.log:0. Best Value = 0.00144914
npt02-sr40-syn-dc0p014-32x24drw.log:1. Best Value = 0.00115706
npt02-sr40-syn-dc0p014-32x24drw.log:2. Best Value = 0.00094345
npt02-sr40-syn-dc0p014-32x24drw.log:3. Best Value = 0.000925552... (11 Replies)
Discussion started by: kristinu
11 Replies
10. Shell Programming and Scripting
to do this i usually type dos2unix <file> -o <file>
and this will remove the M^ from the end of each file. well i have over 100 files that someone copied that i need. how do i remove the M^. i saw a perl script but i am not familiar with .pl at all really (7 Replies)
Discussion started by: deaconf19
7 Replies