10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
Here is a file contents :
declare -Ax NEW_FORCE_IGNORE_ARRAY=(="§" ="§" ="§" ="§" ="§" .................. ="§"Here is a pattern
=I want to extract 'NEW_FORCE_IGNORE_ARRAY' which is the whole word before the first occurrence of pattern '='
Is there a better solution than mine :... (3 Replies)
Discussion started by: jcdole
3 Replies
2. Shell Programming and Scripting
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Discussion started by: redse171
3 Replies
3. Shell Programming and Scripting
I have a file
# cat asasas
AAAAAA
11
22
33
44
BBBBB
NILNILNIL
AAAAAA
22
33
44
55
66
77
88
BBBBB
NILNILNIL (2 Replies)
Discussion started by: anil510
2 Replies
4. Shell Programming and Scripting
Is there a way with aw to print all lines after a string is found
There is a file like this
.......
........
2012/19/11 :11.58 PM some data
lne no date
2012/19/11 :11.59 PM some other data
2012/20/11 :12.00 AM some other data
some line without dates
some more lines without dates... (8 Replies)
Discussion started by: swayam123
8 Replies
5. Shell Programming and Scripting
I wanted to get outcome from a big file with pattern quoted:
Line FSP LSP SR RL
Test1 100 300 4 4000
Test2 1 300 2 300
Any help is greatly appreciated. Thank you. (15 Replies)
Discussion started by: rtsiahaan
15 Replies
6. Shell Programming and Scripting
I am trying to print text between two variables in a file
I have tried the following things but none seem to work:
awk ' /'$a'/ {flag=1;next} /'$b'/{flag=0} flag { print }' file
and also
sed "/$a/,/$b/p" file
But none seem to work
Any Ideas?
Thanks in Advance (5 Replies)
Discussion started by: forumbaba
5 Replies
7. Shell Programming and Scripting
Hello all,
I have a input file like this.
input file
---------------
abc ab001 + ab002 zca
acb ab006 + ab007 caz
cba ab003 + ab004 zca
bac ab004 - ab005 zac
bca ab002 - ab003 cza
cba ab005 + ab006 acz
cba ab005 ... (5 Replies)
Discussion started by: admax
5 Replies
8. Shell Programming and Scripting
Hi ALL :).
i have a file,
cat 3 +
dog 5 +
rat 6 -
i want to print no of record having pattern "+".
thanks in advance :confused:. (2 Replies)
Discussion started by: admax
2 Replies
9. Shell Programming and Scripting
Hi,
I know how to use awk to search some expressions like five consecutive numbers, , this is easy.
However, how do I make awk print the pattern that is been matched?
For example:
input: usa,canada99292,japan222,france59664,egypt223
output:99292,59664 (6 Replies)
Discussion started by: grossgermany
6 Replies
10. Shell Programming and Scripting
the data file is as below:
> cat master.cnf
/usr| location for usr|5
/src/ver1| version 1 |10
/src/ver2/log| ver 2 log |25
/src/sys/apps/log| Application log for sys|36
/src/sys/apps/conf| configuration location for app|45
/src/sys/apps/bin| binary location app|55my script is as below:
... (1 Reply)
Discussion started by: McLan
1 Replies