Can I just say, this is such a frustrating and yet enormously rewarding field of study. I'm in the middle of configuring GeekTool (Uh oh, stupid n00b) and I really only have one question.
I'm using Automator to grab a RSS feed, having GeekTool continually run that application every 10 minutes, putting the results in a text file and then displaying that .txt file. However, the RSS codes their dates by their standards and I don't know how to intercept that and change them to my own time zone.
Here's a picture:
Here's the GeekTool code that runs it:
----
Bonus question: Why is my script cutting off the text file at "NASA unveils ..."? There's plenty room in the window and the actual text file has more content than that. Is there a character limit cut-off that I'm missing in the code?
Okay. So basically I'm extracting from a xml feed and converting it to plain text on a locally stored file.
So the .xml is saved and converted to a plain text file
Now I use GeekTool and a Shell script to display that file on my desktop
----
Now my question is how do I take these dates that were pulled from the xml file:
and alter them using a Shell script to display my desired time?
My desired output would be the date converted to my time zone: Eastern Time Zone, (UTC−05). So basically the same format "yyyy-mm-dd hh:mm:ss" (remove the +0000) but just converted to my time. Can shell script do that?
Ahamed, I hope you're patient with me. I'm still learning so much. So I pasted in your code with my previous code to make this:
Now nothing displays. Maybe that's a GeekTool thing. In fact, maybe I should put your code in a separate .sh file and run that file instead of pasting both segments of the full code right into GeekTool like how I'm currently doing it. What do you think?
Hi Gurus,
I need replace some charactors in a file.
in following example. I need replace from 4th charactor to 6th charactor with x in each line.
abcdefghijklmn
123456789011
excepted result:
abcxxxghijklmn
123xxx789011
Thanks in advance. (6 Replies)
Replace first 3 characters in a unix file (say replace "A&B" with "C&D") in all lines of the file. Need a sed or awk script to do this. Kindly help!
-Kumar (4 Replies)
Hi,
I have file 1 say
abc abcd
abc abcd <some tag> xyx
abcd xyz
abc abcd <some tag> xyx
xyz abc
And i have another file say file 2 -
replaced tag1
replaced tag2
Now i want to put value of file2 in file1 whereever it finds <some tag>.
for e.g. first <some tag> should be replaced... (4 Replies)
I just finish the shell script .
This shell can replace weird characters (such as #$%^@!'"...) in file or directory name by "_"
I spent long time on replacing apostrophe in file/directory name
added: 2012-03-14
the 124th line (/usr/bin/perl -i -e "s#\'#\\'#g" /tmp/rpdir_level$i.tmp) is... (5 Replies)
Hi,
I need to replace 10 characters string (21-30) in a file with another string.
I tried using cut command, i am able get these 10 charaters, but do not know how to replace them inside the file.
for example file content(these are alphanumeric characters):... (3 Replies)
Hi All
At the moment the following code works but ideally i do not want to have to change the original $1
tr "\r" "\n" < "$1" > "$1.fix"
printf "\n" >> "$1.fix"
mv "$1.fix" "$1"
FILE=$1
coffee_out="splitmovie"
coffee_fill="-splitAt"
coffee_end="-self-contained -o output.mov $2"... (1 Reply)
Hi,
I have a file in which i want to replace the charaters from position 3-5 with a particular string for the first line.
For ex
The file contains
abcdefghij
jkdsflsfkdk
908090900
i want to replace the characters 3-5 for the first line as 678
so, the file should look like
... (7 Replies)
Hi all,
I have a file with multiple lines. I want to replace characters 7 through 14 of every line with 0000000
Input:
12345678901234567890
23456789012345678901
Output
12345600000004567890
23456700000005678901
Please help.
JaK (9 Replies)
Hi,
I have a data like this in a file,
402003279034002000100147626030003300010000000000002000029000000 ær^M^\MÍW^H
I need to replace those special char to some other char like # or $
Is there any ways to do it...
I tried commands tr,sed and many but it was not able to replace because... (1 Reply)