Search Results

Search found 2 results on 1 pages for '1line'.

Page 1/1 | 1 

  • How can I replace a line which contains only -------- by |||

    - by mimou
    I have something like: ------------------------------------------------------------------------ r2 | username | 2011-01-16 16:52:23 +0100 (Sun, 16 Jan 2011) | 1 line Changed paths: D /foo Removed foo ------------------------------------------------------------------------ r1 | username | 2011-01-16 16:51:03 +0100 (Sun, 16 Jan 2011) | 1 line Changed paths: A /foo created foo ------------------------------------------------------------------------ My target is to identify the file added by the "username" in a specific date. Thus, I need to have the combination (username, 16 Jan 2011, A) to insure that it is the right file ands then print foo. My idea is to: delete the white spaces change the newlines into | get rid of the --------------- and replace them with newlines but the problem is that I couldn't replace the ------- since they are mixed with other characters. ------------------------------------------------------------------------ |r2|username|2011-01-1616:52:23+0100(Sun,16Jan2011)|1line|Changedpaths:|D/foo|Removedfoo| ------------------------------------------------------------------------ |r1|username|2011-01-1616:51:03+0100(Sun,16Jan2011)|1line|Changedpaths:|A/foo|createdfoo| ------------------------------------------------------------------------ So I thought it would be a good idea to start by replacing the --------------- by a special character like ||| and then change this character by a newline using awk FS=||| OFS=\n Can anyone help me! thanks

    Read the article

  • How To: Custom HTML / CSS Text Button for "Facebook like" & "Twitter Follow"

    - by 1Line
    So i have had a little hunt online about creating custom Facebook like buttons and custom twitter follow button but not really found a solution so thought i would ask here and see if anyone knows of a solution for this (currently i have coded some jQuery to get Facebook and Twitter counts using JSON which works but want some custom buttons as per below) I have the count working all ok, just need to tackle the like and follow buttons - it is done in jquery at the moment so would like to continue to use that if this has to be done via that. at the moment i use the API for each to get the count, if i can integrate into the current js i have to get the calls / functions i require would be good: // grab from facebook var facebook = $.getJSON('https://graph.facebook.com/'+f_page+'?callback=?', function(data) { fb_count = data['likes'].toString(); fb_count_gt = data['likes'].toString(); fb_count = add_commas(fb_count); $('#fb_count').html(fb_count); }); // grab from twitter var twitter = $.getJSON("https://twitter.com/users/"+t_page+".json?callback=?",function(data) { twit_count = data['followers_count'].toString(); twit_count_gt = data['followers_count'].toString(); twit_count = add_commas(twit_count); $('#twitter_count').html(twit_count); }); Thanks in advance!

    Read the article

1