Search Results

Search: Posts Made By: ksk
2,368
Posted By ksk
Hey Chubler_XL and agama, Thanks for your...
Hey Chubler_XL and agama,

Thanks for your help! Maybe I'm doing something wrong, but I tried running agama's code but it doesn't seem to be doing anything to the file (weird). I tried Chubler's...
2,368
Posted By ksk
Adding incomplete HTML code to a file
Hi folks,

I am scraping data from the Internet that has the format similar to what's on this page -- Trigger Notice Report (http://ows.doleta.gov/unemploy/trigger/2011/trig_021311.html)

The...
3,742
Posted By ksk
Fair enough Alister :-) Thanks, I'll use tr from...
Fair enough Alister :-) Thanks, I'll use tr from now on :)
8,199
Posted By ksk
Thanks agama! I wonder if I can get your advice...
Thanks agama! I wonder if I can get your advice on wrapping this all up into a nice shell script. I have several of these text files that are generated through another script and land up in a folder....
8,199
Posted By ksk
'awk --version' gives 'mawk: not an option:...
'awk --version' gives 'mawk: not an option: --version'. 'man awk' gives the man page for mawk. Should I get something else?

---------- Post updated at 01:19 AM ---------- Previous update was at...
8,199
Posted By ksk
Hi agama, I just gave your code a try. It says...
Hi agama, I just gave your code a try. It says awk: line 27: illegal reference to array a
.
8,199
Posted By ksk
Converting txt file into CSV using awk or sed
Hello folks

I have a txt file of information about journal articles from different fields. I need to convert this information into a format that is easier for computers to manipulate for some...
3,742
Posted By ksk
Thanks to both of you. In addition, my way of...
Thanks to both of you. In addition, my way of doing it (from ARCHIVED: How do I convert between Unix and Mac OS or Mac OS X text files? - Knowledge Base (http://kb.iu.edu/data/agiz.html)) is awk '{...
3,742
Posted By ksk
Converting DOS filetype to UNIX
Hello folks

I am working on a project that requires me to write a script that operates on a bunch of text files. When I try less file.txt I see a bunch of ^M's everywhere. Some Googling tells me...
2,784
Posted By ksk
Hey Linuxkid, There are many different types...
Hey Linuxkid,

There are many different types of shell implementations, ranging from ksh, to csh, to bash. Most coding these days, I'm told, is done on bash (you'll get more information if you wiki...
4,518
Posted By ksk
Hi Cristoph That takes out what I need, but...
Hi Cristoph

That takes out what I need, but again, it seems to delete parts of the script that it isn't meant to. For some reason, it removes the first 100 odd lines of script as well. I would...
4,518
Posted By ksk
Thanks Guru. I ran the awk command you suggested....
Thanks Guru. I ran the awk command you suggested. It certainly removes what I wanted, but it also seems to be knocking out some other parts of the file, that are essential.

I tried presenting the...
4,518
Posted By ksk
Thanks everyone. That works perfectly well...
Thanks everyone.

That works perfectly well for the filetype I mentioned. Now, the problem is that I have to take out the line immediately preceding the first pattern as well.

That is, if the...
4,518
Posted By ksk
Remove strings within range using sed
Hey folks

I have a big file that contains junk data between the tags <point> and </point> and I need to delete it (including `<point>' and `</point>').

i.e.

a = 1
<point>
123123
2342352...
23,210
Posted By ksk
That too :-) Thanks again.
That too :-)

Thanks again.
23,210
Posted By ksk
@methyl - Thanks @eclipseagent - My code was...
@methyl - Thanks

@eclipseagent - My code was the same as yours and wasn't working. I finally realized that I had been forgetting to do `chmod +x <filename>'! It works now. Thanks for helping me...
2,424
Posted By ksk
Renaming Movies (or Flipping Portions of Filenames Using sed or awk)
Hey folks

My problem is simple. For my first stash of movies, I used a naming convention of YEAR_MOVIE_NAME__QUALITY/ for each movie folder. For example, if I had a 1080p print of Minority Report,...
23,210
Posted By ksk
Thanks. It fixes the immediate problem, but I'm...
Thanks. It fixes the immediate problem, but I'm curious as to why the RANDOM variable doesn't work inside the script, and I didn't fully understand the symlink explanation. Can you elaborate?
23,210
Posted By ksk
Hey guys So I've just moved to a new...
Hey guys

So I've just moved to a new machine, and reinstalled Ubuntu 10.04 from scratch. I first tried
$ echo $RANDOM
in the shell. It works.
Then, when I tried the same command as a one line...
23,210
Posted By ksk
No luck. Same output
No luck. Same output
23,210
Posted By ksk
$RANDOM does not work inside a shell script
Hi folks

I'm coding on Ubuntu 9.04 standard shell.

I'm writing a script that needs to generate a random number at some point of its execution.

When I do
echo $RANDOMas a command inside...
1,580
Posted By ksk
String Comparison Issues
Hello there. I am trying to write a simple script that pulls the date on which the system was last shutdown (stored in a file called 'last_shutdown') and today's date (the days only) and compares the...
10,143
Posted By ksk
Sorry I'm a complete novice and may have done...
Sorry I'm a complete novice and may have done something wrong. I tried exactly what you had written above. It only seems to create a folder title `{A..Z}{A..Z}{A..Z}{A..Z}'.

Update
I realized...
10,143
Posted By ksk
Simple Script to create folders
Hi

I want to write a small script that will create folders named from `AAAA' all the way to `ZZZZ'.

That is:
`AAAA'
`AAAB'
`AAAC'
...
`AABA'
`AABB'
`AABC'
...
`ABAA'
`ABAB'
`ABAC'...
4,157
Posted By ksk
Thanks muchly :)
Thanks muchly :)
Showing results 1 to 25 of 27

 
All times are GMT -4. The time now is 05:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy