can someone help me write a short script?
I was hoping to write a short script using 'awk' or 'bash scripting' to remove two types of strings from a file: the date, and the full directory of the item (for windows). Also, as you can tell from the use of quotes, I am quite the n00b, and simply guesssed that these might be the tools I might use to remedy this problem. So anyway, back to the problem: instead of
Code:
This Fire Franz Ferdinand 1/02/03 C:\Music\This Fire Code:
This Fire Franz Ferdinand |
Let's see--you want to use Linux tools to manipulate Windows files.....Trouble lies ahead.
First, you need read/write access to the Windows filesystem--If NTFS, then Linux is not very good at that. Are you going to put the files into your Linux filesystem? If you are simply editing multiple lines which have the same overall pattern, then sed will do it. In your example--is this a line from a file? More details, more help.... |
Ok, it is a text file, and it is already on my ext3 partition, so no need to worry about windows :).
Here is another example to make it clearer: Code:
Numb Linkin Park 1/20/03 C:/Music/Linkin Park/Numb Code:
Numb Linkin Park |
im assuming its a plain text file, with all fields seperated by tabs. if thats the case, this should work:
Code:
cut -f1,2 nameoffile |
when you want to use awk try this:
Code:
$ cat aa.txt |
All times are GMT -5. The time now is 10:07 AM. |