Skip to content

How to replace special characters to underscore(_) perl

Using above code i am not able to handle this “Monday_øå_Tuesday_Wednesday” The output should be : Answer You can use W to negate the w character class, but the problem you’ve got is that w doesn’t match your non-ascii letters. So you need to do something like this instead: Outputs: Th…

Add cut/crop marks to pdf with imagemagick

I have a pdf file which is getting generated with Inkscape from SVG and processed with ImageMagick. Now the PDF is a perfect DINA4 @300 DPI How can I add some marks around it? My marks should look like this: http://cl.ly/033g3t2h0U0f/A4_crop.png And I need to place this over the pdf with 3mm to overlap so it&…

Convert number from text file

I have a file: id name date 1 paul 23.07 2 john 43.54 3 marie 23.4 4 alan 32.54 5 patrick 32.1 I want to print names that start with “p” and have an odd numbered id My command: grep “^p” filename | cut -d ‘ ‘ -f 2 | …. result: paul patrick Answer Awk can do it all:

Get specific column from CSV in Bash script

I have a csv with nearly a hundred of column. I am writing a bash script to get only few of those column. CSV: I did some research and found this: But it requires to put ALL the column (92 in my case…) I can’t select want I want. So I try another solution: It cannot work because of the