BASH vraagje

Pagina: 1
Acties:

  • johu
  • Registratie: September 1999
  • Laatst online: 22-01-2024
Bash i.c.m. Redhat 6.0

Is het mogelijk om een regel aan het BEGIN van een bestand toe te voegen i.p.v. aan het einde ?

ik bedoel dus b.v het 'commando':

tekst >> bestand

alleen, zet deze de 'tekst' het aan het einde van 'bestand', maar dat wil ik niet . . .

  • hammerhead
  • Registratie: April 2000
  • Laatst online: 08:09
workaround:
code:
1
2
3
echo test > final
cat bestand >> final
mv final bestand

Weet niet of het netter mogelijk is, maar dit moet werken...

Aviation is proof that given the will, we have the capacity to achieve the impossible.
--Eddie Rickenbacker