10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file like below.
2018.07.01, Sunday
09:27 some text 123456789 0 21 0.06 0.07 0.00
2018.07.02, Monday
09:31 some text 123456789 1 41 0.26 0.32 0.00
09:39 some text 456789012 1 0.07 0.09 0.09
09:45 some text 932469494 1 55 0.29 0.36 0.00
16:49 some text 123456789 0 48 0.12 0.15 0.00... (9 Replies)
Discussion started by: father_7
9 Replies
2. Shell Programming and Scripting
Is there an efficient awk that can count the number of lines that occur in between two tags.
For instance, consider the following text:
<s>
Hi PP -
my VBD -
name DT -
is NN -
. SENT .
</s>
<s>
Her PP -
name VBD -
is DT -
the NN -
same WRT -
. SENT -
</s>
I am interested to know... (4 Replies)
Discussion started by: owwow14
4 Replies
3. Shell Programming and Scripting
Hi All,
Sorry if this question has been posted elsewhere, but I'm hoping someone can help me! Bit of an AWK newbie here, but I'm learning (slowly!)
I'm trying to cobble a script together that will save me time (is there any other kind?), to swap two fields (one containing whitespace), with... (5 Replies)
Discussion started by: Bravestarr
5 Replies
4. UNIX for Advanced & Expert Users
Hello All,
My requirement is to get test between two words START & END, something like html tags
Eg. Input file:
START
Line1
Line2
Line3
CLOSE
START
Line4
Line5
Line6
END
START
Line7
START
Line8 (7 Replies)
Discussion started by: konerusuneel
7 Replies
5. UNIX for Dummies Questions & Answers
Hi,
how could you go about removing words that begin with a certain character.
assuming that this character is '-' I currently have
echo "-hello" | sed s/-/""/
which replaces the leading dash with nothing but I want to remove the whole word, even if there are multiple words beginning... (3 Replies)
Discussion started by: skinnygav
3 Replies
6. Shell Programming and Scripting
I'm a bit new to regex and sed/perl stuff, so I would like to ask for some advice. I have tried several variations of scripts I've found on the net, but can't seem to get them to work out just right.
I have a file with the following information...
# Host 1
host 45583 {
filename... (4 Replies)
Discussion started by: TheBigAmbulance
4 Replies
7. Shell Programming and Scripting
Hello,
i am trying to write a script file in awk which yields me the number of lines,characters and words, i checked it many many times but i am not able to find any mistake in it. Please tell me where i went wrong.
BEGIN{
print "Filename Lines Words Chars\n"
}
{
filename=filename + 1... (2 Replies)
Discussion started by: salman4u
2 Replies
8. Shell Programming and Scripting
I made a script that can swap info on two lines using a combination of awk and sed, but was hoping to consolidate the script to make it run faster. If found this script, but can't seem to get it to work in a bash shell. I keep getting the error "Too many {'s". Any help here would be appreciated:... (38 Replies)
Discussion started by: LaTortuga
38 Replies
9. UNIX for Dummies Questions & Answers
Hey all
i am pretty new to awk... here my problem.
My input is something like this:
type: NSR client;
name: pegasus;
save set: /, /var, /part, /part/part2, /testpartition,
/foo/bar,... (9 Replies)
Discussion started by: bazzed
9 Replies
10. Shell Programming and Scripting
I have a file that contains a great number of lines, let's say 183 lines, and I want to add: echo " to the beginning of each line. What is the easiest way to do it?
Tx (9 Replies)
Discussion started by: Ernst
9 Replies