Search Results

Search: Posts Made By: patelamit009
4,551
Posted By patelamit009
Dear Gopal, I tried below at my end seems to be...
Dear Gopal,
I tried below at my end seems to be working.. ;)

Inputs:

$ cat source.txt
aaaa="$col1,$col2,$col3,$col4"

$ var_file_name="1 2 3 4"
$ echo ${var_file_name}
1 2 3 4

$...
9,190
Posted By patelamit009
Regular Expression For Space
Hi all,

I want a regular expression that will check for the space.

I mean, it should accept everything but no space should be there in the variable.

e.g. var1="aaaa" >>> OK

var2='aaa vv'...
1,898
Posted By patelamit009
try this: if [ $retVal -eq N ]; then echo...
try this:

if [ $retVal -eq N ]; then
echo "Refresh is still going on"
else
echo "Refresh is done!! You can start the make"
fi
4,159
Posted By patelamit009
You are Great! Its Working!
You are Great!

Its Working!
4,159
Posted By patelamit009
Execution of awk command in a variable
Hi All,

I have a awk command that is stored in a variable.

the value of the variable cmd is:
(mean output of echo $cmd is: )

awk -F";" '{print $1}'

Now I want to execute this command.
...
1,985
Posted By patelamit009
While loop with read command is working. ...
While loop with read command is working.

Thanks A lot Sir! :b:
1,985
Posted By patelamit009
For Loop
I am having a file Temp.txt with following record.

ACCT_ARR_SUMM_INTERFACE_HEW , ACCT_OPEN_DT || '}' || ARR_SRCE_KEY || '}' || SRCE_SYS_CDE , ACCT_OPEN_DT '}' ARR_SRCE_KEY '}' SRCE_SYS_CDE

i...
5,030
Posted By patelamit009
Thanks for the explanation radoulov. Amit
Thanks for the explanation radoulov.

Amit
3,197
Posted By patelamit009
You can even do that using... echo `cat...
You can even do that using...

echo `cat filename`

It should work.

Amit
5,030
Posted By patelamit009
Hi radoulov, Command that you suggested is...
Hi radoulov,

Command that you suggested is working.

For my knowledge can you please elaborate how it works.

Thanks radoulov,
Amit
5,030
Posted By patelamit009
Thanks Penchal. Its working Now. :b:
Thanks Penchal.

Its working Now. :b:
2,131
Posted By patelamit009
Reg: Query in sed
Hi Penchal,


I would appreciate if you can provide me a brief explanation on what you are trying to do in the commnad below.


echo "6-9-2008" | sed 's/\(.\)-\(.\)-\(.*\)/\3-0\2-0\1/g'
...
5,030
Posted By patelamit009
Thanks for replying Penchal. Your command is...
Thanks for replying Penchal.

Your command is giving me the output as below...

1,AAA,XXX
2,BBB,YYY
3,CCC,ZZZ
5,,EEE
6,,QQQ
,,

I am getting all the records from file2 appended with the...
4,856
Posted By patelamit009
Try this.... As you have not specified the...
Try this....

As you have not specified the record delimiter, I assuming it as comma (,).

awk -F, 'NR==FNR {a[$1]=$2} NR!=FNR {if(a[$1]=="") {next} print $1,$2,a[$1] }' T2 T1

You will get the...
5,475
Posted By patelamit009
awk -F"|" 'NR==FNR {a[$1]=$2} NR!=FNR {print...
awk -F"|" 'NR==FNR {a[$1]=$2} NR!=FNR {print $0,"|",a[$1]}' f2 f1

Explanation:
------------

1) NR=FNR checks for the first file and stores the value of the second column from file "f2" in an...
5,030
Posted By patelamit009
Fullouter Join of two files.
Hello All,

I have two files with following data.

File1:

1,AAA
2,BBB
3,CCC
4,DDD

File2:
1,XXX
2,YYY
3,ZZZ
5,EEE
6,QQQ


Expected Output Should be:
Forum: Linux 06-09-2008
3,177
Posted By patelamit009
can you please tell me what is the significance...
can you please tell me what is the significance of "-i" option in the command.???

i tried to find out but failed to get any info from net. :(
3,870
Posted By patelamit009
I think it can be done in this way.... This...
I think it can be done in this way....

This is for file having three fields (columns) and the command will display
only the column with maximum length.

awk -F"|" '{ l1=length($1) ;...
Showing results 1 to 18 of 18

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