Txt

Byte sized tech know-how.

  • Home
  • About

Tag Archives: number

07 Jul

Add Line Numbers

Use this command to add line numbers to a text file…


sed = filename.txt | sed 'N;s/\n/\t/' > filename_number.txt
admin Posted in Command Line, Linux command, line, Linux, number, numbering, sed, shellfu 3 Comments
03 Jul

Fetch a URL With a Number Series

Use this command to download numbered content…


for ((i=1; i<9; i++)) ; do  wget "http://www.example.com/$i.txt" ; done
admin Posted in Command Line, internet, Linux command, download, for, Linux, number, url, wget 1 Comment
02 Jul

Zero Padding In Linux Commands

This is how you zero pad a numerical variable in bash.


for ((x=1;x<=31;x+=1)); do echo `printf "%02d" $x`; done

Original Article

admin Posted in Code, Command Line, Linux command, for, Linux, number, pad, padding, printf, zero Leave a comment

Post navigation

Categories

  • Code
  • Command Line
  • Configuration
  • CSS
  • HTML
  • internet
  • JavaScript
  • Linux
  • Mobile
  • Perl
  • PHP
  • Python
  • Ruby
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Fruitful theme by fruitfulcode Powered by: WordPress
↑