Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: shashi792
3,290
Posted By shashi792
Shell to Python variable passing
Hi, I had to create a new thread as the old thread had to much of confusion

I have two files shashi.sh and py.py
I want to pass a variable from shashi.sh to py.py. How do i achieve that ?.
...
17,177
Posted By shashi792
L is obtained from another script (this changes...
L is obtained from another script (this changes everytime) from the previous script im using export L command to pass it between scripts

what should be done for changing L
17,177
Posted By shashi792
The method is not working below is my...
The method is not working

below is my actual code.
export L=128

cd /home/betafish/Desktop/Cpp_codes/gnuradio/acoustic
echo "$("pwd")"
echo "$L"
exec python ofdm_acoustic.py "$L"

and the...
17,177
Posted By shashi792
Passing variable from shell script to python script
I have a shell script main.sh which inturn call the python script ofdm.py, I want to pass two variables from shell script to python script for its execution. How do i achieve this ?????

Eg:
...
2,163
Posted By shashi792
@ itslee, Thanks for answering, that was not...
@ itslee,
Thanks for answering, that was not what i was looking for.

@ franklin,
This is what i wanted exactly, at last found it :), is it possible that i overwrite in the same file instead of...
2,163
Posted By shashi792
@Franklin, I did not understand your question....
@Franklin,
I did not understand your question.

I have these problem when i am streaming my text file to a C++ array.

rite now i am manually going to the line 15 and at the end of the line...
2,163
Posted By shashi792
I'm sorry, but the code dosent work. its not...
I'm sorry, but the code dosent work. its not removing my last line. i still get the o/p as i got in first case

---------- Post updated at 11:22 AM ---------- Previous update was at 11:18 AM...
2,163
Posted By shashi792
deleting the lines at the end of the file.
I have a text file with two coulmn
first column is just used in to show the line number, these line number are not there in the real file.

I want to delete the line 16(in this file) here, even...
6,352
Posted By shashi792
column operation using awk
I have atxt file,i want to perform some operation on 3rd coulmn

900.00000 1 1 1
500.00000
500.00000
100000.000
4
4
...
2,098
Posted By shashi792
No, its no an homework. Its an output file from...
No, its no an homework. Its an output file from modelling software, i have to perform the fft and fftshift operation in order to find the channel impulse response.

channel impulse response is...
2,098
Posted By shashi792
No not
No not
2,098
Posted By shashi792
Column operation : cosne and sine operation
I have a txt file with several columns and i want to peform an operation on two columns and output it to a new txt file .

file.txt
900.00000 1 1 1
500.00000 ...
1,878
Posted By shashi792
Export command variable exporting problem
I have a txt file from which i am assiging a value to a variable
using the code in script1
script1.sh

export f=$(sed -n "/Freq *=/ s/.*= *//p" ${R_path}/output.txt)
echo "$f" --------> this...
2,188
Posted By shashi792
Assigning a value as a variable from a text file
I have a txt file


output.txt

Freq = 1900
L = 159I want to assign the values to a variable so that i can further use it in some other script.
like
F=1900
Len=159
etc

i tried doing...
1,150
Posted By shashi792
The code seems to be not working.,The code is...
The code seems to be not working.,The code is showing some error.
sed: -e expression #1, char 0: no previous regular expression
2,031
Posted By shashi792
I am also a beginner but this will work, may be...
I am also a beginner but this will work, may be there is bttr way to do it also
awk ' { print $2 $3}' testfile1 >>newfile
1,150
Posted By shashi792
sed command
I have three files
file1:
600 1481.14 /
700 1478.19 /
800 1476.59 /
900 1475.21 /
1000 1475.87 /
1100 1477.3 /
1200 1478.89 /
1300 1479.95 /
1400 1481.25 /
1500...
4,134
Posted By shashi792
The command works good. I have few quries...
The command works good. I have few quries regarding the command

1> what does FNR do?.
2> "next" ??
3> FNR in a ??? ->
4> can u explain the syntax used......the
4,134
Posted By shashi792
awk command - column merging
I have two files having 3 coulms and 1 column respectively
file1.txt
0 22.89 35.60
10 22.80 35.61
20 22.70 35.63
30 22.32 35.68
50 19.23 35.79
75 16.10 ...
2,442
Posted By shashi792
The program works perfectly fine, I have one more...
The program works perfectly fine, I have one more query
if i want to access the first month this works fine, in case i want to get the 2nd or third month then (second or thirs number in Temp ot...
2,442
Posted By shashi792
data extraction from xml file
I have an of xml file as shown below
<?xml version='1.0' encoding='ASCII' standalone='yes' ?>
<Station Index="10264" >
<Number Value="237895890" />
<Position Lat="-29.5" Lon="3.5" />
...
9,581
Posted By shashi792
The code runs good, but when i am using the below...
The code runs good, but when i am using the below code (a part of it for further processing )
it is throwing me the error

int range_m = range*1000;

error: invalid operands of types 'const...
9,581
Posted By shashi792
its showing In function 'int main(int,...
its showing

In function 'int main(int, char**)':
test_file.cpp:24: error: invalid operands of types 'const char*' and 'int' to binary 'operator*'
2,580
Posted By shashi792
awk command: column operations
I have a txt file with two columns

Freq Loss
10 30
20 40
30 10
40 50
50 60i have used the below code to get the minimum value out of this array in...
9,581
Posted By shashi792
Shell variable to c++ program as input
I have an Shell script which has few global variables
eg :

range=100;
echo "$range"

I want to use the same variable in my C++ program for example
int main()
{ cout << range << "\n"; }...
Showing results 1 to 25 of 35

 

Featured Tech Videos

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