INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

print code between word and next blank line

print code between word and next blank line

(OP)

Hello

I'm novice and
I need to print the code between "convert" to next blank line
Please help me

CODE -->

+ f *.tif | f *.tiff | f *.TIF | f *.TIFF & t t
t convert to jpg
  set %t
  while [ -n "$1" ]; do
    convert "$1" -quality 100 $(basename "$1").jpg
    shift
  done

+ f *.jpg | f *.JPG & t r
e Affiche l'EXIF de la photo
  clear
  exiv2 %f
  printf 'Press [Enter] key to continue...'
  read null

+ f *.pdf | f *.PDF & t t
p Transforme un fichier PDF sécurisé en normal
  set %t
  while [ -n "$1" ]; do
    gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="$1.test.pdf" "$1"
    shift
  done

+ f *.eps | f *.EPS | f *.ai | f *.AI & t t
s Convertir Un fichier EPS,AI en SVG
  set %t
  while [ -n "$1" ]; do
    pstoedit -f plot-svg $1 $1.svg
    shift
  done 

RE: print code between word and next blank line

Hi

One way could be this :

CODE --> command line

sed -n '/convert/,/^$/{/^ /p}' ~/.config/mc/mcedit/menu 

Feherke.
feherke.ga

RE: print code between word and next blank line

(OP)
Great, thanks very mutch it's work

RE: print code between word and next blank line

Hi

Oops. Now I see this is the Awk forum. So here is the Awk equivalent too :

CODE --> command line

awk '/convert/,!NF{if(/^ /)print}' ~/.config/mc/mcedit/menu 

Feherke.
feherke.ga

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close