10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
I have to search servers name say like 1000+ "unique names" line by line in child.txt files in another file that is a master file where all server present say "master.txt",if child.txt's server name matches with master files then it print yes else no with server name. (4 Replies)
Discussion started by: netdbaind
4 Replies
2. Shell Programming and Scripting
I have a text file ( basically a log file) and i have 2 words (alpha, beta),
Now i want to search these two words in one line and then print next 15 lines in a temp file. there would be many lines with alpha and beta But I need only last occurrence with "alpha" and "beta" and next 15 lines.
... (4 Replies)
Discussion started by: kashif.live
4 Replies
3. Shell Programming and Scripting
Hello and Happy New Year 2012!
I have this example:
1,2,3 4,5,6 7,8,9
For that, I'm trying to get:
1,2,3
4,5,6
7,8,9
for that, I think this might work but doesnt work so far:
awk '{for(i=1;i=NF;i++);sub(/\//,"",$i);print $i}' myfile (2 Replies)
Discussion started by: Gery
2 Replies
4. Shell Programming and Scripting
Hi,
Please suggest a way to print number of words in the end of each line.
<input file>
red aunt house
blue sky
bat and ball game
<output file>
red aunt house 3
blue sky 2
bat and ball game 4
Thanks! (2 Replies)
Discussion started by: mira
2 Replies
5. Shell Programming and Scripting
My file looks like:
asd absjdd
sdff vczxs
wedssx c
dasx ccc
I need to keep
asd
sdff
wedssx
dasx
How do I do that experts?:wall::wall: (1 Reply)
Discussion started by: hakermania
1 Replies
6. Shell Programming and Scripting
Gurus,
I have a file containing lines like this :
Now, number of words in each line varies. My need is, if a word repeats in a line get it printed. Also total number of repeats.
So, the output would be :
Any help would be highly appreciated.
Thanks & Regards (5 Replies)
Discussion started by: AshwaniSharma09
5 Replies
7. Shell Programming and Scripting
Hello all
i know it is pretty hard one but you will manage it all
after noticing and calculating i find a rhythm for the file i want to edit
to copy the last 12 characters in line but the problem is to add after first 25 characters in same line
in other way too copy the last 12 characters... (10 Replies)
Discussion started by: princesasa
10 Replies
8. Shell Programming and Scripting
Hi experts
I need to pick 2 matched words from the same line.....
I have given below an example file
eg:
O14757 hsa04110 hsa04115 2 P38398 hsa04120 1
O15111 hsa04010 hsa04210 hsa04920 hsa04620 hsa04660 hsa04662 hsa05200 hsa05212 hsa05221 hsa05220 hsa05215 hsa05222 hsa05120 13 O14920... (4 Replies)
Discussion started by: binnybio
4 Replies
9. Shell Programming and Scripting
can u help me out to print last two words of each sentence of a file.
for example.
contents of input file:
i love songs
my favourite songs
sent
songs all kind
good buddy
Ouput file should contain:
love songs
favourite songs
sent
all kind
good buddy (5 Replies)
Discussion started by: pradeepreddy
5 Replies
10. Shell Programming and Scripting
I have some txt files. I have to create another text file which contains the portion starting from the format "Date Sex Address" to the end of the file. While using grep -n on Date it also gives me the previous line containg Date. and also Date may be DATE in some files.
My file is like this... (10 Replies)
Discussion started by: Amiya Rath
10 Replies