Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
wc -m en Unix agrega un carácter

Contar una línea con 4 caracteres sin carácter de nueva línea:

 ACTG

wc -m me da 5. Con echo, puedo arreglar este problema así que

 echo -n 'ACTG' | wc -m

Pero si ACTG está en un archivo de texto sin carácter de nueva línea, obtengo 5. ¿Por qué es así?

 $ ls -l file -rw-rw-r-- 1 user user 5 Feb 11 15:27 file $ hexdump -C file 00000000 41 42 43 44 0a |ABCD.| 00000005
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Como le ha mostrado hexdump, cualquier editor que esté usando agrega un carácter '\n' o 0x0A (nueva línea) al final de la línea cuando guarda el archivo, incluso si no está escribiendo uno explícitamente.

Ver: http://www.asciitable.com/

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!