Programming :: Run The Script Test Using The Word "locate"?
May 4, 2011
I have a perl script called "test" that I would like to run using a different name instead of typing
"perl test" For example how could I run the script test using the word "locate".
View 4 Replies
ADVERTISEMENT
Mar 4, 2010
Well, I am facing one issue:How can i read two files word by word at a time using any loop as i need word by word comparision in shell script?Please let me know pseudo code.
View 14 Replies
View Related
Jan 21, 2011
I have a output file look like this:
{"test1" : "test2", "test3" : "test4"},
How can I read word by word in each line?This is not working code:
a=0
while read word
do a=$(($a+1));
[code]...
View 14 Replies
View Related
May 4, 2010
I am pretty new to bash scripting...I am trying to write a script that will take an input and read it word for word and then DO something with it like echo. I have been able to find how to read word for word from a file but I don't know how to do it with input.
I was looking for something like
Code:
exit 0 The input would be A-Z a-z 0-9 and have a single space between each word.
View 2 Replies
View Related
Oct 17, 2010
I ran a firmware test, after I discovered a bad memory stick on a 1 gb stick. Replaced my memory stick and just for grins ran a firmware test and I don't understand this:[Fail] Failed to locate HPET base [Fail] OS/2 memory hole test-The memory map has a memory hole between 15mb & 16mb.
Re-ran MEMTEST just to make sure my new memory was fine, no errors.My Linux OS appears to be running slower on boot-up than normal, What documentation there is on the internet on HPET is over my head.I ran SMART on the both drives. They were good. So I am a little stumpted.
View 3 Replies
View Related
Jun 28, 2011
Want to search for ~ and delete it as well as to append the entire line to the above line. For Ex:
1111xxxx date Sandy area is ~around this area.3222xxx date There seems to ~left side of map, the colours are accurate (showing green areas)Even if I ~zoom in, the green parks, xxx3258 date The dammed up
~away, the "other" body of water varies ~blackNatural gas leaching.
IT MUST LOOK LIKE:
1111xxxx date Sandy area is around this area. 3222xxx date There seems to left side of map, the colours are accurate (showing green areas)Even if I zoom in, the green parks, xxx3258 date The dammed up away, the "other" body of water varies blackNatural gas leaching.
View 4 Replies
View Related
Mar 25, 2011
i jst want to delete a host entry from httpd.conf the entry for lal.com should be deleted!!
View 14 Replies
View Related
Nov 9, 2010
I have these but not working.
size_t count_words(const std::string& s)
{
std::istringstream is(s);
return distance( std::istream_iterator<std::string>(is),
std::istream_iterator<std::string>());
}
and
std::string s; // word count
unsigned int wordno = 0;
while(getline(myfile, s))
{ ++wordno;
if(s.empty())++ wordno;
else wordno += count_words(s);
std::cout << s << '
';
}
myoutput1<< "Number of words : " << wordno << '
';
myoutput1 << "
Word" <<" " <<" Occurrence" <<endl;
myoutput2<< "Number of words : " << wordno << '
';
myoutput2 << "
Word" <<" " <<" Occurrence" <<endl;
View 6 Replies
View Related
Feb 19, 2010
I have to modify formsweb.cfg file in Oracle IAS.
Problem description
In formsweb.cfg file are two lines with labels archive_jini= and archive= at the beginning of line. After equal sign (=) is row of filenames of java archives delimited by coma(,). When I insert a new jar file in java directory, I have to append the very same name of jar file to both lines if that name is not yet present.
Example snippet from formsweb.cfg
View 2 Replies
View Related
May 23, 2010
I'm building a script for my place of employment. The next step in it is checking what the user input was. Determining if they added a part in there or not. The script prompts for a hostname. Hostnames are localhost.localdomain. Now, I want the script to check to see if they put localdomain and if they did, not to add the domain to the /etc/sysconfig/network, but just what they entered. So say the user inputs:
[Code]....
View 4 Replies
View Related
Jul 6, 2010
I have a large tab delimited text file, about 17gb. It only has 6 column. On column number 4, it is all numbers. Ranging from 1-1000. I want to count how many times each number occured. So the output I want is in 2 columns, first one is a number, second column is how many times it occured. I tried
head -n 1000 coverage | cut -f 4 | uniq -c
Didn't work for me, the first column returned is not unique.
View 3 Replies
View Related
Dec 22, 2010
How to find a word from different files in linux ?
Is there any command like (find . / -name *****), that can search files in the system for a particular word in Linux?
View 5 Replies
View Related
Dec 30, 2010
If I do:
for i in $(cat names); do seq -f "$i%03.0f" 0 999; done > output5.txt
I got ( tail snipped):
997munt
998munt
999munt
If I do:
for i in $(cat names); do seq -f "%03.0f$i" 0 999; done > output4.txt
I got:
997Zygmunt
998Zygmunt
999Zygmunt
How I can get numbers from 000 to 999 appended like:
Zygmunt997
Zygmunt998
Zygmunt999
View 8 Replies
View Related
Apr 7, 2011
Word Count for all files in a directory
View 1 Replies
View Related
Feb 13, 2009
ive searched around about this for a bit, but have been unable to find a working and suitable solution for me to do, what i require is to be able to change a string such as:hIs Is a TeSt to --> This Is A Test - AND place it in a variable - so far ive only succesfully been able to make the whole sentence uppercase or lowercase.
View 2 Replies
View Related
Jul 11, 2010
I have a file having name test.txt content of which is following My Self is Arvind Kumar.My Date of Birth is 21/07/1984.I am 26 year year old.I did M.Sc Informatics from Delhi University in 2008.I did B.Sc Electronics from Acharya narendra Dev college Delhi University.I did my schooling from DAV Yusuf sarai.Curren tly I am working with InterGolbe Technologies as a Associate software Engineer.I want to be Linux Expert. What I am doing I am creating a list of words,But i want to take B.Sc and M.Sc as a single word
[Code]....
View 5 Replies
View Related
Apr 2, 2010
Just like ContentLink here on LQ itself, how do I popup a little box or something like that, when a particular word is mouseovered on?
View 3 Replies
View Related
Nov 18, 2010
I have this statement which greps .csv files. Code:my @files=grep {$_ =~ /.csv/}What about if I needed to get files with the word 'hosts' in the middle?
View 2 Replies
View Related
Jan 6, 2011
so i have a file that has the following
file1.txt
ID1 age_11 dog_n3 parent_dog_n1
ID1 age_7 dog_n4 parent_dog_n3
ID1 dog_n5 age_4
ID1 dog_n6 age_4
[Code].....
As you can see i would like the output file to be just the dogs, not the otehr information. But because the information is mixed up how can i extract only the dogs? (i cant do and awk '{print }' because the dogs are found in colounm 2 or 3 or sometimes even 4.
View 9 Replies
View Related
Aug 18, 2009
I have a file which has the words "splashimage and "splash". I would like to remove the word only "splash" from everywhere.
Using the following command code...
View 2 Replies
View Related
Jun 11, 2010
I am using RHEL 4.5.
I am trying to count no. of characters in a word but it is coming one more than what it actually should be.
Code:
I can have a work around by subtracting 1 from the output (6-1=5 in this case). BUT, I am just curious to know, why the character count is coming as 6 and not 5.
View 7 Replies
View Related
May 21, 2011
I need a command to find the all files which filename contains the text "SomeText" and to delete that files!From /home/movie/wp-content/uploads/this folder I have lots of files and folders .Also I need that for folders and subfolders who contains some text in folder name "someTextInFolderName"
View 13 Replies
View Related
Aug 9, 2009
I want to know that how can i search for a word in a file and then comment it or delete it. I know this command works.
sed 's/word/#word/'g inputfile > outputfile
But the lines in my input file are as under:
zone "abc.com" { ---- This line can be comment
type master; ----- This line repeat again and again in the file
file "abc.txt";
allow-query { any; }; -This line repeat again and again in the file
};
I want to know how can i comment a certain zone.
View 8 Replies
View Related
Apr 28, 2011
I love medit for text editing, but it's missing a word count feature.
I found a "Statistics for medit" script on the Arch Linux Forums, but after installing as instructed, there was no popup.
So I set it to output to a pane instead, and I got:
Code:
My scripting skill is extremely basic, so any troubleshooting. (I'm using CrunchBang Statler, which is Debian Squeeze based.
View 6 Replies
View Related
Oct 3, 2010
Quote:
1: #!/usr/bin/perl -w
2:
3: use CGI;
4: use CGI::Carp qw(fatalsToBrowser);
[code]....
DataAccess.pm is placed into /home/savio/myperlprograms, but I have following errors:
Quote:
Can't locate DataAccess.pm in @INC (@INC contains: /home/savio/myperlprograms /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/lib/cgi-bin/login.cgi line 7.
BEGIN failed--compilation aborted at /usr/lib/cgi-bin/login.cgi line 7.
View 3 Replies
View Related
Jul 16, 2011
A long time ago I wrote a short essay about the 'federal' 'reserve' board. I don't remember it's name or format. I think it's somewhere on my rather large hard discs (to of them divided into various partitions).I'm trying to write a command line that will find it based on a quote that is in it: "our fathers brought forth"I have tried various configurations of grep, and or combining grep with find, but I'm getting nowhere. I really don't understand the syntax of either command, or how they work together, and the examples that I can find are really no help at all.
View 6 Replies
View Related
May 1, 2010
Trying to change to upper case first letter of every word over a specific column.
View 10 Replies
View Related
Apr 13, 2011
I have a fresh dedicated server that im currently configuring and needed a little help if I may ask.The problem is that i'm having a file naming issue. for example from the web I can access any file that does not have spaces of any type. ex/music/musicfile.mp3this works fine and my php script can locate itBut the problem is when I try to access a file that has spaces.ex/music/The Eagles - Hotel California.mp3my php script can't seem to locate any files like this with spaces but doesn't have a problem locating the files with no spaces.
I also took a look at the directory within shell. I did notice that files that have spaces are showing up in this formatt in shell.#/home/~username/public_html/music/The Eagles - Hotel California.mp3In shell , i'm assuming that unix/linux maybe adds a backslash before spaces. But when I FTP to this same directoy, the filename look normal and at windows standard. how could I correctly access these types of files within my php scrits? or would I need to have all uploaded files renamed so that spaces are replaced with underscores maybe?
View 4 Replies
View Related
Dec 8, 2010
I have grepped a log file to obtain every line that contains a word (let's call it 'blah'). I now want to only display a list of entries within that search result that feature the word 'host' anywhere in the line, and I also want to display the single word *after* 'host' (up until the next space). So, the end result will look like this:
[Code]....
View 8 Replies
View Related
Dec 22, 2010
I can find points to Tillies Garrels TLDP reference. Do I want to create my own variable to hold the string or do I want to place the string in memory? Is that my problem? Or is something different causing the 'bad substitution' error.
[code]...
View 14 Replies
View Related