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. Post Here to Contact Site Administrators and Moderators
In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123.
So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Discussion started by: Jagmeet Singh
3 Replies
3. Shell Programming and Scripting
Hi guys,
I am running a while loop in a script ro read a file line by line.
Now I want to run a grep only on the lines below the line I am that is being read by the while loop.
Eg:
If my while loop is on line 4 of the file, the grep only runs below line 4 and does not include line 1,2... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
4. 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
5. Shell Programming and Scripting
Hello all,
after spending hours of searching the web I decided to create an account here. This is my first post and I hope one of the experts can help.
I need to resolve a grep / sed / xargs / awk problem.
My input file is just like this:
----------------------------------... (6 Replies)
Discussion started by: bash4ever
6 Replies
6. Shell Programming and Scripting
Hi All,
Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example :
abc.txt
7000,john,2,1,0,1,6
7001,elen,2,2,0,1,7
7002,sami,2,3,0,1,6
7003,mike,1,4,0,2,1
8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have to search and count unique occurence of DE numbers in bold below in a file which has content like below.
Proc Tran F-BUY
Item Tkey Q5JV
Item Tsid JTIZ9
Item Tdat 20091001
Item Tset 20091001
Item Tbkr 5
Item Tshs 2
Item Tprc 897.0
Item Tcom 2000.0
Item Tcm1 20091001... (6 Replies)
Discussion started by: akash028
6 Replies
8. Shell Programming and Scripting
Hi
I need a perl onliner which seaches a line starting with a pattern(last occurence) and display it.
similar to
grep 'pattern' filename | tail -1 in UNIX
Ex: I want to display the line starting with "cool" and which is a last occurence
adadfadafadf
adfadadf
cool dfadfadfadfara... (4 Replies)
Discussion started by: ammu
4 Replies
9. Shell Programming and Scripting
I would like to write a script which will read a file containing a list of filenames of the format as shown below :
/usr/local/packages/runcmdlinetool
/home/john.doe/sdfsdf/sdfsdfsd/sdfsdf/sdfsdfTemplates.xml
/usr/local/bin/gtar... (4 Replies)
Discussion started by: inditopgun
4 Replies
10. UNIX for Dummies Questions & Answers
How can we find the number of occurence of a specified pattern in a file?
This command would be a part of a shell script. (5 Replies)
Discussion started by: videsh77
5 Replies