Search Results

Search: Posts Made By: engr.jay
5,465
Posted By engr.jay
no, it's not an assignment. string=$word ...
no, it's not an assignment.

string=$word

i used awk '/$word/' input_file but it failed
5,465
Posted By engr.jay
input a string and copy lines from a file with that string on it
i have a file1 with many lines. i have a script that will let me input a string. for example, APPLE. what i need to do is to copy all lines from file1 where i can find APPLE or any string that i...
Forum: Programming 06-28-2011
1,655
Posted By engr.jay
how to output data with only an specific string on it
hi! i made an sql script but i do not know how to just output all the lines that starts with an specific string. and that string, you will input it before i run the sql

for example:

INPUT NAME:...
2,018
Posted By engr.jay
find string and and print another string
i have a file that looks like this

ABC123

aaaaaaaaaaaaaaasssssssssssssssffhhh


ABC234

EMPTY


ABC652

jhfffffffffffffffffffffffffffffffffffkkkkkkkkkkkk



i want to grep "EMPTY"...
1,856
Posted By engr.jay
actually the original file looks like this ...
actually the original file looks like this

abc 123 2345
abc 2478
abc 4684
def 346 4793
def 3578
def 7832
1,856
Posted By engr.jay
combine and fill series
hi all! i have a script with an output like this

abc 123 1246
abc 1386
abc 2589
abc 7383

what can i do if i want to fill the 2nd column with the 2nd string '123'

abc 123...
4,254
Posted By engr.jay
what if for example, i want to have 'NO' instead...
what if for example, i want to have 'NO' instead of '-'

thanks!
4,254
Posted By engr.jay
yes but i have this file named filter.awk which...
yes but i have this file named filter.awk which is composed of many if's. finding age is one of them
4,254
Posted By engr.jay
thanks hlash! but i already have a file...
thanks hlash! but i already have a file filter.awk.. i'm just puzzled on how to putput "-" instead of just blank
4,254
Posted By engr.jay
help in if and if not using awk
i have a working file like this

name: xxxxx age :24
name: xyxyx age :35
name: yyyyy age : -

if (substr($3,1,3) == "age") {b=substr($4,2,2)}

the output should:

24
35
-
...
1,907
Posted By engr.jay
Get strings on a file and print
hi all! i have a file like this
lea 25 female
dave 18 male
jake 27 male

and i want to have an output file like this
my name is lea. i am 25. female
my name is dave. i am 18. male
my name is...
2,745
Posted By engr.jay
hi! can you please help me with this.. i have a...
hi! can you please help me with this.. i have a more complicated problem now. my example can be found below:

CHILD'S NAME :John
FATHER'S NAME :Paul
MOTHER'S NAME :Mary
BIRTH DATE ...
5,730
Posted By engr.jay
Compare selected columns of two files and print whole line with mismatch
hi! i researched about comparing two columns here and got an answer. but after examining my two files, i found out that the first columns of the two files are not unique with each other. all i want...
2,745
Posted By engr.jay
thanks a lot!
thanks a lot!
2,745
Posted By engr.jay
yes, i cant use substr and your syntax all...
yes, i cant use substr and your syntax all together. thanks!
2,745
Posted By engr.jay
it worked! thanks! but i do have a follow up...
it worked! thanks!

but i do have a follow up inquiry. my raw data is like this:

123 456 ABS-05
UNIX C/-

i need a result like this:

UNIX 123 456


i used awk' ((substr...) to get 123...
2,745
Posted By engr.jay
thanks! but will it give the same results with: ...
thanks! but will it give the same results with:

cat file1 | awk '/\/-/{print $1}' >> file2
2,745
Posted By engr.jay
Finding a string with another string is found
finding a string with another string is found

EX:

abs c/-

i want to find /-, then copy abs. i know it's easy use awk, but my problem is the substr syntax.

substr($2,2,2) will give me /-...
7,199
Posted By engr.jay
from my pc.
from my pc.
7,199
Posted By engr.jay
hi! thanks for the reply. but what do you...
hi! thanks for the reply.

but what do you mean by control character?

i didn't use vi editor. i just ftp-ed it
7,199
Posted By engr.jay
Syntax error near unexpected token
hi! just want to seek help on this error: syntax error near unexpected token 'do

this is my script

# !/bin/sh
#


for y in 27 25
do
exemmlmx -c "ZEEI;" -n XRT$y >> blah
done

what can...
Showing results 1 to 21 of 21

 
All times are GMT -4. The time now is 01:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy