function for copy files with progress bar (using pv – pipe viewer)

2010-11-11 1 min read Bash Linux

function for copy files with progress bar (using pv – pipe viewer)

  <td>
    <div class="text codecolorer">
      &nbsp;cp_p() { if [ `echo "$2" | grep ".*/$"` ]; then pv "$1" > "$2""$1"; else pv "$1" > "$2"/"$1"; fi; }
    </div>
  </td>
</tr>
1

dont have to type new file name (it copy file under same name) and dont have to use ‘/’ in the end of destination folder (but you can if u want, its idiot proof)

Continue reading

Print all environment variables, including hidden ones

2010-11-09 2 min read Bash Fedora Linux

Print all environment variables, including hidden ones

  <td>
    <div class="text codecolorer">
      for _a in {A..Z} {a..z};do _z=${!${_a}*};for _i in `eval echo "${_z}"`;do echo -e "$_i: ${!_i}";done;done|cat -Tsv
    </div>
  </td>
</tr>
1

This uses some tricks I found while reading the bash man page to enumerate and display all the current environment variables, including those not listed by the ‘env‘ command which according to the bash docs are more for internal use by BASH. The main trick is the way bash will list all environment variable names when performing expansion on ${!A*}. Then the eval builtin makes it work in a loop.

Continue reading

Skyline with Red color – from mobile.

2010-11-07 1 min read Photo

Have you ever wondered, how the red skyline would look if you did not have your favourite camera with you to capture it. I had only my Samsung Omni Windows Mobile with me to capture this, do comment on how they look 🙂

[Red Skyline][1]
Red Skyline
[Red Skyline][2]
Red Skyline
[Red Skyline][3]
Red Skyline
[Red Skyline][4]
Red Skyline
Enhanced by Zemanta

Flower photos for you :)

2010-11-05 1 min read Photo

Here are few more photos that I took at my home with my favourite Nikon DSLR D5000. Hope you like them.

[Flower][1]
Flower
[Flower][2]
Flower
[Flower][3]
Flower
[Flower][4]
Flower
Enhanced by Zemanta

Announcing the release of Fedora 14 and upgrade procedure.

2010-11-03 4 min read Fedora

Before you read the release announcement, you can update/upgrade to F14 with :

  <td>
    <div class="text codecolorer">
      &nbsp;sudo yum upgrade --releasever=14
    </div>
  </td>
</tr>
1

Note : You might get some un-resolvable dependencies, you can remove those pakages and continue and it should be a smooth migration.

It’s here! It’s here! It’s really here! Fedora 14 has been officially released! Fedora is a leading edge, free and open source operating system that continues to deliver innovative features to many users, with a new release approximately every six months.

Continue reading

Photo Editing with nice border and preparing for print.

2010-11-02 3 min read Fedora Photo

Working with photos in Linux is very easy with lots of viewers/editors/managers and what not. Not that there are not many options in Windows but most of them are not free. BEST case scenario is that you might get a evaluation version (i.e. if you do not use pirated/cracked version) of software‘s. Me, being completely against pirated and cracked version or evaluation version (if not, planning to buy the same) like the freedom of choice with Linux.

Continue reading
Older posts Newer posts