Hi everybody,
I just start my learning about Linux.
So, if you can help me, it would be very good !
I have already find the possibility to find the position of a character regular expression in a line with the help of awk :
test.txt is : AAAAAGHIJKLAjKMEFJKLjklABCDJkLEFGHIJKL
My script is like this :
And my findstring.awk is like this :
The command returns 21, as expected (beginning of the string "jkl").
With string = "JKL", the command returns 9 18 36, as expected also.
But, I'm not able to apply the same system with the same .awk to find not only "jkl" regular expression, but also in the same time "JKL" and "JkL".
By extension, the goal is to find a regular expression without case sensitivity, and also able to find "jKM" (with a variability at one or more positions in this same regular expression).
I really want to thank you before your answers.
Best.
cat filename| awk '{ $1=""; print $0}'
in my file there are few lines that has more than 3000 characters per line and as soon as I run the above command it cores, strings core reveals that the awk is failing because input string too long, limit. can i get some help from the experts to find... (8 Replies)
Hi Experts
I need your help to optimize my script to execute better as I have nearly 1M records & the script is taking close to 40 minutes to execute, so would need support on a faster alternative.
Input: file
{"house":"1024","zip":"2345","city":"asd","country":"zzv"}... (2 Replies)
How can I grep multiple strings from an input, strings are separated by space.
Strings to grep:
7680FR 6791HH 1234AA
Input:
AA 7680FR
AA 6891HH
AA 6791UA
BB 9834HA
BB 1434AB
DD 1234AA
DD 6991HH
DD 6791HH
Required output:
AA 7680FR (9 Replies)
Hi:
This is my first post in this forum. apologies if I am asking question that has been asked here multiple times.
I wrote a python script that prints list of identifiers. I have another file notoriously big and with no particular format.
I plan to search the identifiers in this file... (2 Replies)
Hi all ,
i want to pass multiple files as input to a for loop
for i in file1 file2 file3
do
some awk action < $i >> $i.out
done
but im getting error in that for loop is the way i use to pass files to awk using for correct and
2.we can directly pass multiple files to awk as... (7 Replies)
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Hi All,
I am new to shell scripting..My problem is i want to give multiple csv files as input to awk script and process the data into one file..
My input file is
File1 File2 File3
Product Location Period SalesPrice
A x 8/11/2010 ... (7 Replies)
Hi,
I have a function in a bash script that returns a string after some operations using awk.
The following code returns 555
$VARIABLE="EXAMPLE"
get_number $VARIABLE
this value I'd like to pass it as a second argument of another script with the following usage
myscript.sh <param1>... (7 Replies)
Hi,
filenames:
contains name of list of files to search in.
placelist
contains the names of places to be searched in all files in "filenames"
for i in $(<filenames)
do
egrep -f placelist $i
if ]
then
echo $i
fi
done >> outputfile
Output i am getting: (0 Replies)
I saw a couple of posts here referencing how to handle more than one input field separator in awk. I figured I would share how I (just!) figured out how to turn this line in a logfile:
90000000000000000000010001 name... (4 Replies)