Search Results

Search: Posts Made By: abk07
2,340
Posted By abk07
Thank you :)
Thank you :)
2,340
Posted By abk07
Help in assigning values to variables from the file
Hi! This might be a simple thing, but I'm struggling to assign values to variables from the file.

I've the following values stored in the file.. It consists of only two rows..

10
20
I want to...
2,571
Posted By abk07
Help in selecting line numbers between two values
Hi! I've a file as shown below


1 hello
2 how
5 are
3 you
4 hello
5 world

Every statement consists of line numbers at the beginning which are not in sequence.

Now I want to select all...
4,321
Posted By abk07
Hi!! Got it!! Thanks!! :)
Hi!! Got it!! Thanks!! :)
1,758
Posted By abk07
Help in separating variables declared in the main function
Hi! I've a C program as shown below..
The line numbers and the statements of the program are separated by a space..


1 #include<stdio.h>
2 char a,b,c;
3 float x,y,z;
4 int main()
5 {
6 int...
4,321
Posted By abk07
Hi sorry couldn't reply.. Was on an educational...
Hi sorry couldn't reply.. Was on an educational trip.. Ya check the attachment for the sample program..
4,321
Posted By abk07
Sample file for what??
Sample file for what??
4,321
Posted By abk07
Help in retrieving the ending line numbers of the functions
Hi! I've a C file which consist of many function definitions with numbers at the beginning as shown below..



10 void search()
11 {
12 /*body
14 *
15 *
17 *
18 *
40 *
42 *
60 }
90 void...
1,885
Posted By abk07
thanks for the reply but am not getting any...
thanks for the reply
but am not getting any output by using grep -Fw command..:(

---------- Post updated at 02:49 PM ---------- Previous update was at 02:42 PM ----------

thank u..its working...
1,885
Posted By abk07
Select the exact matching contents using grep
Hi everyone I've two files..
The contents of file1 are as shown below



4
5
12
13
36
37
45
46
47

The contents of file2 are as shown below


21 hello
13 world
3,492
Posted By abk07
Guys guys consider this example.. void...
Guys guys consider this example..

void main()
{
float radius, area;
clrscr();
printf ("Enter the radius of a circle\n");
scanf ("%f", &radius);
area = PI * pow (radius,2);
printf...
3,492
Posted By abk07
Yes I tried it.. But it becomes highly difficult...
Yes I tried it.. But it becomes highly difficult if I try to include each and every operator.. Isn't it??
I mean as the number of operators increases the code becomes huge..
3,492
Posted By abk07
Hmm alright.. Thanks anyway.. ----------...
Hmm alright..
Thanks anyway..

---------- Post updated at 03:05 PM ---------- Previous update was at 02:58 PM ----------




Hey thanks for replying.. But it wont work in my case..
Look if...
3,492
Posted By abk07
hey I got the following message sed:...
hey I got the following message


sed: can't read s/ [\(\=\+\]//g: No such file or directory
3,492
Posted By abk07
Hey no.. The command which you have given...
Hey no.. The command which you have given replaces all the blank spaces in the file!!
I want only in those two cases which I've mentioned..
3,492
Posted By abk07
Help with removal of spaces between operators and operands
Hi I'm trying to remove blank spaces in expressions and function calls..
Consider the following example



printf ("Hello");
a = a + b;
I'm trying to eliminate space in between the function...
4,115
Posted By abk07
Thank you for all your replies! :)
Thank you for all your replies! :)
4,115
Posted By abk07
Assign Line Numbers to each line of the file
Hi! I'm trying to assign line numbers to each line of the file
for example consider the following..
The contents of the input file are



hello how are you?
I'm fine.
How about you?
I'm...
1,724
Posted By abk07
Thank you! :) ---------- Post updated at...
Thank you! :)

---------- Post updated at 01:47 PM ---------- Previous update was at 01:47 PM ----------



Thank you! :)
1,724
Posted By abk07
Hi thank you!! But isn't it possible to do the...
Hi thank you!!
But isn't it possible to do the same using sed command??
1,724
Posted By abk07
Help with removal of blank spaces from the second field!
Hi everyone..
I'm trying to eliminate multiple whitespaces from a file..
I must make use of shell script to eliminate whitespaces..
Take a look at the sample file


1 int main()
2 { ...
2,398
Posted By abk07
Hey thank you!! :) This code worked! sed...
Hey thank you!! :)
This code worked!

sed ':b s/,\([[:blank:]]*[^0-9]*\)[0-9]/,\1,/g;tb' tst
2,398
Posted By abk07
Hey consider the file below.. 1 ...
Hey consider the file below..


1 a,b,c,d e,f,g,h,i
2 a,a,a a,b
3 a,b,c,d,a,b a,b
4 x,y p,q
5 a,b b,c
6 a,b,2 2,3

If I use your command I get the...
2,398
Posted By abk07
Hey my line numbers are also gone!! :( ...
Hey my line numbers are also gone!! :(

---------- Post updated at 03:44 PM ---------- Previous update was at 03:39 PM ----------




Hey my line numbers are also gone!! :(
2,398
Posted By abk07
Thank u so much!! :) Its working! :) But...
Thank u so much!! :)
Its working! :)

But I'm a noob.. could you please tell me what is ":b" "t" and "b" doing in the script??
Showing results 1 to 25 of 31

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