10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I am attempting to merge the following lines which run over two lines using awk.
INITIAL OUTPUT
2019 Sep 28 10:47:24.695 hkaet9612 last message repeated 1 time
2019 Sep 28 10:47:24.695 hkaet9612 %ETHPORT-5-IF_DOWN_INTERFACE_REMOVED: Interfa
ce Ethernet1/45 is down (Interface removed)... (10 Replies)
Discussion started by: sand1234
10 Replies
2. Shell Programming and Scripting
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
3. 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
4. Shell Programming and Scripting
I have an OCR output with some words splitted into single characters separated by blank spaces,
and I want the same text with these words written correctly.
Example:
This is a text w i t h some s p l i t e d W o r d s .
The regular expression for matching splitted words could be something... (5 Replies)
Discussion started by: dokamo
5 Replies
5. Shell Programming and Scripting
I have a large file which reads like this:
fixed-address 192.168.6.6 {
hardware ethernet 00:22:64:5b:db:b1;
host X;
}
fixed-address 192.168.6.7 {
hardware ethernet 00:22:64:5b:db:b3;
host Y;
}
fixed-address 192.168.6.8 {
hardware ethernet 00:22:64:5b:db:b4;
host A;
}... (4 Replies)
Discussion started by: ksk
4 Replies
6. 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
7. Shell Programming and Scripting
Hi everyone,
I need help with a merging problem. Basically, I have a file with several lines (in this example 9 lines) such as:
Amie, Jay, Sasha, Rob, Kay
Mia, Frank
Jay, Nancy, Cecil
Paul, Ked, Nancy, 17, Fred
14, 16, 18, 20
9, 11
12, Frank
18, Peter, 62
Nancy, 27
A delimiter is... (3 Replies)
Discussion started by: awb221
3 Replies
8. UNIX for Dummies Questions & Answers
Hello!
I have a script that is (among other things) doing the following:
list=/tmp/list1.txt
ncftpls -u <user> -p <password> -x "-l1" server.domain.tld > $list
cat $list | nl
echo "Choose file: "
read file
cat /tmp/list1.txt | nl | grep $file | sed -e "s/$file//g" -e "s/ //g" | column -t... (8 Replies)
Discussion started by: noratx
8 Replies
9. Shell Programming and Scripting
Hi,
Anybody help on this. :(
I want to merge the line with previous line, if the line starts with 7.
Otherwise No change in the line.
Example file aa.txt is like below
122122
222222
333333
734834
702923
389898
790909
712345
999999
My output should be written in another file... (6 Replies)
Discussion started by: senthil_is
6 Replies
10. Shell Programming and Scripting
Hi there,
I have a couple of files I need to merge. I can do a simple merge by concatenating them into one larger file.
But then I need to filter the file to get a desired result.
The output looks like this:
TRNH 0000000010941
ORDH
OADR
OADR
ORDL
ENDT 1116399 000000003... (2 Replies)
Discussion started by: Meert
2 Replies