Search Results

Search: Posts Made By: phemanth24
4,910
Posted By phemanth24
dude...i don't think you picked my what i wrote...
dude...i don't think you picked my what i wrote previously
i asked to use back-tick (`)

you are using single quotes...
there is a difference
4,910
Posted By phemanth24
okay use backtick with the cat command too! ...
okay
use backtick with the cat command too!
should work

d=`cat process-id`
4,910
Posted By phemanth24
try doing a: [code] d=`echo $$` [\code] ...
try doing a:

[code]
d=`echo $$`
[\code]

i guess that should do
1,808
Posted By phemanth24
echo $$ gives the process id of your shell
echo $$ gives the process id of your shell
7,776
Posted By phemanth24
error?
is this your complete script?

could you list the error that you are seeing?
2,975
Posted By phemanth24
Hi FunibonE...thanks...that works
Hi FunibonE...thanks...that works
3,366
Posted By phemanth24
BTW, you could also bypass putting this into a...
BTW, you could also bypass putting this into a script.


awk '/(^A)|(^B)/ {num++} END {if(num > 0);printf("%d instances of A,B exist\n", num);}' column


'column' is the file where I have the...
3,366
Posted By phemanth24
Hi Samz. I should have elaborated further. I...
Hi Samz. I should have elaborated further.
I put my code into a script and ran it with awk.


awk -f <script name> <file>


Currently it prints the number of instances of A and B
2,975
Posted By phemanth24
One thing you can do is this: ksh test2.ksh...
One thing you can do is this:

ksh test2.ksh $i > <filename> &

Re-direct your output to some other filename will solve the problem you mentioned but I don't know if this works for you..
...
3,366
Posted By phemanth24
Try this: /(^A)|(^B)/ {num++} END {if(num...
Try this:

/(^A)|(^B)/ {num++}
END {if(num > 0);printf("%d instances of A,B exist\n", num);}

You can modify the output the way you want.
Forum: Solaris 07-17-2008
27,776
Posted By phemanth24
do you mean hostname?
do you mean hostname?
1,469
Posted By phemanth24
Not sure I understand your question very well... ...
Not sure I understand your question very well...

My take on this...
Suppose you have two files test, test1.
I'd do a vi test* which will open test.
I'll make my changes and do a write.
Then go...
92,398
Posted By phemanth24
It does work for me... Here's the file...
It does work for me...

Here's the file output
bash-2.05b$ cat file1
/home/hemanth/*.txt

...and here are my commands...
bash-2.05b$ DDPATH=`cat file1`
bash-2.05b$ echo "$DDPATH"...
92,398
Posted By phemanth24
Redirecting cat
this works..

DDPATH=`cat file1`
echo "$DDPATH"

whatever you do just make sure you double quote your DDPATH variable when you print (or rather echo!)

cheers,
Hemanth
Showing results 1 to 14 of 14

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