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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print code between word and next blank line

Status
Not open for further replies.

ecmanfr

Technical User
May 14, 2005
9
FR

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
 
Hi

One way could be this :
Code:
sed -n '/convert/,/^$/{/^ /p}' ~/.config/mc/mcedit/menu


Feherke.
feherke.ga
 
Great, thanks very mutch it's work
 
Hi

Oops. Now I see this is the Awk forum. So here is the Awk equivalent too :
Code:
awk '[fuchsia]/convert/[/fuchsia][teal],![/teal]NF[teal]{[/teal][b]if[/b][teal]([/teal][fuchsia]/^ /[/fuchsia][teal])[/teal][b]print[/b][teal]}[/teal]' ~/.config/mc/mcedit/menu

Feherke.
feherke.ga
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top