Jump to content

Unix questions urgent......


Recommended Posts

Posted

[quote author=mba link=topic=203023.msg2475193#msg2475193 date=1308147804]
last question every file annadu... one file kaadhu..  ^G#W
[/quote]
:surprised-038: :surprised-038: :surprised-038: malli thappu chadiva question..
aa filename place lo * petteskoovoyyy
grep -o -m 1 -n "abc" *

  • Replies 38
  • Created
  • Last Reply

Top Posters In This Topic

  • krldr871

    12

  • mba

    8

  • robo

    7

  • shah01

    6

Popular Days

Top Posters In This Topic

Posted

[quote author=John Galt link=topic=203023.msg2475204#msg2475204 date=1308148082]
:surprised-038: :surprised-038: :surprised-038: malli thappu chadiva question..
aa filename place lo * petteskoovoyyy
grep -o -m 1 -n "abc" *
[/quote]ee paatii aadiki quiz lo 3 uqestions lo 2 questions wrong... emayya leader..

Posted

[quote author=mba link=topic=203023.msg2475205#msg2475205 date=1308148148]
ee paatii aadiki quiz lo 3 uqestions lo 2 questions wrong... emayya leader..
[/quote]
CITI_c$y CITI_c$y CITI_c$y question thappu sadive alavatu chinnapati nunchi undi baaa..em sestaam

Posted

[quote author=shah01 link=topic=203023.msg2475212#msg2475212 date=1308148291]
naa quiz ki  inko half an hour undi time.
[/quote]
*=: *=: aithe corrections anni careful ga chusi test chesko bhayya..malli theda vaste nannu dobbutaaru..already ee mba nannu dobbudu start chesadu  sFun_duh sFun_duh sFun_duh

Posted

It's ok nenu choosukoni pampistaa
anyways thank you very much

Posted

sarey sarey nee kosam answers anni group chestha aagu


a.  Find all lines with the word “Exception” in all files
a) grep -H "Exception" *

b.  Find the last 5 lines with the word “Exception” in a single file

grep -n  "Exception" <file> | tail -n 5

c)  Find the line number of the first line with the word “Exception” in every file
grep -o -m 1 -n "Exception" *

Posted

[quote author=John Galt link=topic=203023.msg2475215#msg2475215 date=1308148331]
*=: *=: aithe corrections anni careful ga chusi test chesko bhayya..malli theda vaste nannu dobbutaaru..already ee mba nannu dobbudu start chesadu  sFun_duh sFun_duh sFun_duh
[/quote]hey i tested everything yaa.. it worked..  CITI_$D# CITI_$D#

Posted

[quote author=mba link=topic=203023.msg2475228#msg2475228 date=1308148710]
hey i tested everything yaa.. it worked..  CITI_$D# CITI_$D#
[/quote]
-o ,-m , -n ante ento cheppu baa  s%H# s%H#

Posted

[quote author=Cheddi Chinnodu link=topic=203023.msg2475233#msg2475233 date=1308148808]
-o ,-m , -n ante ento cheppu baa  s%H# s%H#
[/quote]unix system ki poyi grep --help ani kottu anni vasthayi


Output control:
  -m, --max-count=NUM      stop after NUM matches
  -b, --byte-offset        print the byte offset with output lines
  -n, --line-number        print line number with output lines
      --line-buffered      flush output on every line
  -H, --with-filename      print the filename for each match
  -h, --no-filename        suppress the prefixing filename on output
      --label=LABEL        print LABEL as filename for standard input
  -o, --only-matching      show only the part of a line matching PATTERN
  -q, --quiet, --silent    suppress all normal output
      --binary-files=TYPE  assume that binary files are TYPE;
                            TYPE is `binary', `text', or `without-match'
  -a, --text                equivalent to --binary-files=text
  -I                        equivalent to --binary-files=without-match
  -d, --directories=ACTION  how to handle directories;
                            ACTION is `read', `recurse', or `skip'
  -D, --devices=ACTION      how to handle devices, FIFOs and sockets;
                            ACTION is `read' or `skip'
  -R, -r, --recursive      equivalent to --directories=recurse
      --include=FILE_PATTERN  search only files that match FILE_PATTERN
      --exclude=FILE_PATTERN  skip files and directories matching FILE_PATTERN
      --exclude-from=FILE  skip files matching any file pattern from FILE
      --exclude-dir=PATTERN  directories that match PATTERN will be skipped.
  -L, --files-without-match  print only names of FILEs containing no match
  -l, --files-with-matches  print only names of FILEs containing matches
  -c, --count              print only a count of matching lines per FILE
  -T, --initial-tab        make tabs line up (if needed)
  -Z, --null                print 0 byte after FILE name

Posted

[quote author=John Galt link=topic=203023.msg2475215#msg2475215 date=1308148331]
*=: *=: aithe corrections anni careful ga chusi test chesko bhayya..malli theda vaste nannu dobbutaaru..already ee mba nannu dobbudu start chesadu  sFun_duh sFun_duh sFun_duh
[/quote] *7*^ *7*^ *7*^ endi anni taffule cheftunau

Posted

[quote author=John Galt link=topic=203023.msg2475208#msg2475208 date=1308148216]
CITI_c$y CITI_c$y CITI_c$y question thappu sadive alavatu chinnapati nunchi undi baaa..em sestaam
[/quote]testing cheyani developer lu maaku akkarledhu.. turn east  *7*^ *7*^

Posted

[quote author=mba link=topic=203023.msg2475226#msg2475226 date=1308148683]
sarey sarey nee kosam answers anni group chestha aagu


a.  Find all lines with the word “Exception” in all files
a) grep -H "Exception" *

b.  Find the last 5 lines with the word “Exception” in a single file

grep -n  "Exception" <file> | tail -n 5

c)  Find the line number of the first line with the word “Exception” in every file
grep -o -m 1 -n "Exception" *
[/quote]mama a ans lo * searches in all file in pwd kada  sCo_^Y

Posted

[quote author=ROBO link=topic=203023.msg2475258#msg2475258 date=1308149430]
mama a ans lo * searches in all file in pwd kada  sCo_^Y
[/quote]yup... all subdirectories kuda kavali ante -r option add cheyali..
and instead of * . vaadithe work avuthundhi anukunta..

Posted

[quote author=mba link=topic=203023.msg2475228#msg2475228 date=1308148710]
hey i tested everything yaa.. it worked..  CITI_$D# CITI_$D#
[/quote]
F@!n F@!n F@!n

×
×
  • Create New...