Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. mohand1

    Probably a stupid scanf/getchar question

    that is because of the way the input is fed into the program. WHen you ask for choice, you (ie scanf) waits for new line to be pressed before seeing the input. Since you are reading a 'char' only, this newline is in the input buffer and that is what your next getchar (or even scanf) will see...
  2. mohand1

    Removing lines from files

    type this in command mode in vi :%s/^V^M//g Basically your are removing the ctrl-M character from the file. You will have to type ctrl-V before typing ctrl-M. Mohan
  3. mohand1

    To read "core" files

    Hi Kumar, try gdbx. Mohan
  4. mohand1

    project in c

    Depends on the scope you are looking at. You could try to build a memory manager if you are looking at something decent but not that complex. Will give you good exposure to pointers, linked lists etc ... Mohan
  5. mohand1

    sh loop on files

    Hello mike, Do the following $ for file in `ls -1` > do > echo "file is [$file]" > # do whatever you want to do here > done Mohan
  6. mohand1

    To read "core" files

    Hi Kumar, The core file contains all the process information pertinent to debugging: contents of hardware registers,process status, and process data. You can do a "man core" and see all the gory details. You can use the core file to debug and see where and how the program failed...
  7. mohand1

    Unix - getting a string line in a file

    Hi Kate, Try this while Line=`line` do echo &quot; $Line&quot; done < filename This should work in bourne/K shell. Mohan
  8. mohand1

    Equivalent of pmap (of Solaris) in Tru64

    Hi, I need to know the equivalent of pmap command of Solaris in Tru64. pmap of solaric gives the foll output $ pmap pid 23349: bash 00010000 432K read/exec /usr/bin/bash 0008A000 80K read/write/exec /usr/bin/bash 0009E000 168K read/write/exec [ heap ] FF100000...
  9. mohand1

    c or c++ faster

    It all depends on how you do it. Since every c program is a c++ program, does that mean you are just using different compilers ? In that case i dont think there will be any difference(atleast with gnu compilers). But to comment on generality, C is faster. Mohan
  10. mohand1

    executing scripts

    ensure that the path of the scripts is in your PATH env. For your case do the following setenv PATH .:$PATH After this, the scripts will execute just by the name. If you are very sure, you could add this to your .cshrc file Mohan
  11. mohand1

    Simple scripting problem - convert `wc -l` to an int

    The best way i think is this #!/bin/bash num_sii=`ls /home/sii/incoming/ | wc -l | tr -d ' '`; if [$num_sii -eq 0] then echo &quot;There aren't any new files.\n&quot; else echo &quot;There are $num_sii new responses.&quot; ... fi
  12. mohand1

    Find statement

    You could do something like this ... find . -name &quot;$dat&quot; -exec ls -Fd {} \; 2>/dev/null | awk '{.............}' This should work.

Part and Inventory Search

Back
Top