Search Results

Search: Posts Made By: mahabunta
1,704
Posted By mahabunta
sed with variable
where
x=old_testx


sed 's/$x/New_test/g' <file >file

can any body help to execute the above command
7,267
Posted By mahabunta
if condition ...
i have following if condition

if [ "$data_type" == "ASCII" ]

above statement is case sensitive.....what is syntax if i have to make above comparision case insensetive
3,313
Posted By mahabunta
Parameter to script
Can i pass more than 9 parameters to unix shell script

if yes in script how can I get that parameter

z=${10}

WILL ABOVE STATEMENT GIVES ME VALUE FOR 10TH PARAMETER PASSED
1,878
Posted By mahabunta
case insenserive comparision
in If statement how can i campare

"ASCII" with "ascii"

the result of comparision shold be true.....
5,098
Posted By mahabunta
total number of lines
Hi have following file

|abcd
2|abcd
|sdfh
|sdfj

I want to find total number of files haivng nothing in feild 1 using awk

will command
awk -F "|" '( $1=="") {print NR}' test_awk

will...
1,798
Posted By mahabunta
awk - grep
I have file


dadad|12|A
dsfasf|33|C
fdafdd|44|Y

can i get the rows with only A or C in third column using awk
17,630
Posted By mahabunta
sorting in awk
i have following file have following type of data

1~%%~fcashfafh~%%~9797

can i sort(numeric) the file on first field and then on last feild using awk
3,230
Posted By mahabunta
Thanks for quick reply....i guess this will solve...
Thanks for quick reply....i guess this will solve my problem.....thanks a lot
7,599
Posted By mahabunta
displaying range of columns
can i display range of columns in AWk...

say in cut command i can display columnm 2-13....

is there is any simmilar command in awk
3,230
Posted By mahabunta
thanks for reply....but i dont now the number of...
thanks for reply....but i dont now the number of fields.....it can be variable.....
\

can i do like in awk ...

say i have to get entire string form second field.....without calculating total...
3,230
Posted By mahabunta
spllting the string
Hi

I have string

"sdfhhs","shfdjhfhfjshfshfsjhf",dsfsafsfs

I want to split this string into two parts...

var1="sdfhhs"
var2="shfdjhfhfjshfshfsjhf",dsfsafsfs

can somebody tell me how...
5,335
Posted By mahabunta
Supress ' quotes in a select statement inside Shell Script
Hi
I have a shell script in which a string variable is saving following query.
SqlQuery="select a||'|'||b||'|'||c from dual"

I am trying to pass above query as a parameter to some script...
1,599
Posted By mahabunta
I guess problem is coming because of default...
I guess problem is coming because of default value of IFS variable...
When I set that to new variable the code is working fine
8,781
Posted By mahabunta
IFS variable
How can I set the value for IFS variable
1,599
Posted By mahabunta
strange problem for substr
i have following in block

if [ `expr substr "$line_by_line" 1 13` == "0000000000000" -o `expr substr "$line_by_line" 26 12` == "UA ITEM FROM" ]
then
echo "Exclusion criteria"
else
echo "Not...
5,172
Posted By mahabunta
Thanks Anubh ...it works...
Thanks Anubh ...it works...
5,172
Posted By mahabunta
multiple Logical statement
hi I have following if condition
line_by_line="0000000000000tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt"

if [ `expr substr "$line_by_line" 1 13` ==...
2,038
Posted By mahabunta
Thanks a lot. It worked!!
Thanks a lot. It worked!!
1,426
Posted By mahabunta
array help
I have attray in unix

now initially i want to initialize it to "" then how can i do that
2,038
Posted By mahabunta
Need help in Regular Expression
I have a file with data that looks like -

record nullable { final_delim=end ,delim="~%%~" ,quote=none }
(
1_UPC:string[13];
2_QUANTITY:string[7];
)

I want to fetch the first column that...
6,018
Posted By mahabunta
if condition
Can i have following if condition

if [ Condition ]
then
else
statements execute
fi
1,330
Posted By mahabunta
thanks anubh while loop worked... :D
thanks anubh while loop worked... :D
1,330
Posted By mahabunta
line containig spaces
hi i have file having following contain

2~%%~2~%%~7~%%~1~%%~none~%%~XYZ_MOV_HDR_REC~%%~1~%%~17_REC_ID == "H"
2~%%~2~%%~8~%%~2~%%~none~%%~XYZ_MOV_EXCL~%%~2~%%~20_UPC<=99999999

see the last...
3,719
Posted By mahabunta
hi.....I got resolution to my issue.... As i...
hi.....I got resolution to my issue....

As i am using shell variable in sed command, so instead of single quote we have to give double quotes.....

thanks
mahabunta
3,719
Posted By mahabunta
the output should be `echo $line_by_line |...
the output should be

`echo $line_by_line | awk -F "|" '{print $1}'`>=5

thanks and regards
mahabunta
Showing results 1 to 25 of 45

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