Search Results

Search: Posts Made By: sreeharshasn
1,879
Posted By sreeharshasn
Yes it solves.. but why does'nt ... work only...
Yes it solves.. but why does'nt ... work only for the 3rd line :)
1,879
Posted By sreeharshasn
Grep with ... matching more than 3 characters
I am trying to understand what the grep command in ubuntu is trying to do here.
The contents of my test file is given below

harsha@harsha-H67MA-USB3-B3:~/Documents$ cat data
abcd
efghi
jklmno...
Forum: Programming 04-06-2012
1,513
Posted By sreeharshasn
Bug in "Word Counting" Program
I have written a simple program that counts the number of words in the input stream. There is a small bug in the code and i am not able to figure out the cause of this bug.




#include...
4,766
Posted By sreeharshasn
Deciding whether to get a buffer cache block or inode block
I was reading a book on UNIX internals "The design of the UNIX Operating system." There are two memory structures that are confusing me:
1) Buffer cache
2) Inode cache

My questions are
1)...
Forum: Programming 10-11-2011
5,395
Posted By sreeharshasn
can you please explain in simple terms what is...
can you please explain in simple terms what is wrong.. and how to correct it?
Forum: Programming 10-10-2011
5,395
Posted By sreeharshasn
Compilation Error: dereferencing pointer to incomplete type
I am getting a dereferencing pointer to incomplete type error when i compile the following code on lines highlighted in red. Can anyone help me in identifying what is wrong in the code?
...
1,007
Posted By sreeharshasn
Usage of $(
I recently came across this construct that i am not able to understand.
ex: cat $(grep -l 'HELLO' *)
the above command prints out the contents of the file if HELLO string is present in the file....
2,540
Posted By sreeharshasn
ls file.110328.Z && ls file_prev.110328.Z
ls file.110328.Z && ls file_prev.110328.Z
2,489
Posted By sreeharshasn
more, less are other file displaying commands....
more, less are other file displaying commands. Yes you can definitely use cat in your script
5
1,737
Posted By sreeharshasn
Doubt
harsh@harsh-desktop:~$ echo abcd | od -bc
0000000 141 142 143 144 012
a b c d \n
Quoted or not quoted.. newline is added to the end of the string.
5
1,737
Posted By sreeharshasn
Doubt
harsh@harsh-desktop:~$ echo "abcd" | od -bc
0000000 141 142 143 144 012
a b c d \n
As you can see echo adds a newline at the end of the string echoed so you get 5 as the number of...
12,141
Posted By sreeharshasn
Not an elegant Solution but a solution anyways.....
Not an elegant Solution but a solution anyways.. I am sure there will be better ways of doing this

following is a shell script that searches for the string in a given field.
#!/bin/bash
if [ $#...
16,235
Posted By sreeharshasn
grep -v "\*$" fileWithStar.txt >...
grep -v "\*$" fileWithStar.txt > fileWithoutStar.txt
Forum: Programming 11-03-2010
5,865
Posted By sreeharshasn
It is sort of a puzzle.
It is sort of a puzzle.
Forum: Programming 11-01-2010
5,865
Posted By sreeharshasn
Thanks man. found out more than a few ways...
Thanks man. found out more than a few ways through which one can find the filename of the executing program. One interesting way was through __FILE__ macro which is passed to the compiler during...
Forum: Programming 10-31-2010
5,865
Posted By sreeharshasn
Finding the path of the C program
Hi All,
I have a c program called findPath.c in a path /home/harsh/c-Programs/. How can i find the path where the program is stored at runtime?? I have given the following
#include<stdio.h>
int...
22,887
Posted By sreeharshasn
Thanks everyone for helping me understand the...
Thanks everyone for helping me understand the situation. The perl interpreter was actually mounted when the first time an ls command was given.
22,887
Posted By sreeharshasn
ls command gives "Not a directory" error message
The operating system is Solaris. There is a perl interpreter that is located at /opt/perl5.10.0/perl. when i give
ls -ltr /opt/perl5.10.0/perl
I get an error message saying that...
Showing results 1 to 18 of 18

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