09-20-2010
This User Gave Thanks to john1212 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
Req your help in searching and replacing the word that comes after equals(=) symbol
I would like to replace the sting in bold with a string in variable.
d=ABCDF8C44C22
# grep -i NIM_MASTERID ${_NIMINFO}
export NIM_MASTERID=00CDF8C44C00
I'm looking to replace any word that... (4 Replies)
Discussion started by: ajilesh
4 Replies
2. Shell Programming and Scripting
When the following is typed:
/usr/platform/`uname -i`/sbin/prtdiag | awk '{print $7; exit}'
...the output I get back is either "X4150" or "X4170" when executed on a Sun Fire X4150 or X4170. ---But, may I ask how do I assign the variable $model to it?
Because of the embedded backquotes, I... (3 Replies)
Discussion started by: chatguy
3 Replies
3. Shell Programming and Scripting
Hi,
I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this:
Records
P1
10,23423432
,77:1
,234:2
P2
10,9089004
,77:1
,234:2
,87:123
,9898:2
P3
456456
P1
:123,456456546
P2
abc:324234 (2 Replies)
Discussion started by: vsachan
2 Replies
4. UNIX for Dummies Questions & Answers
Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name".
Thanks for the reply in adv,:) (3 Replies)
Discussion started by: virtual_45
3 Replies
5. Shell Programming and Scripting
I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word description excluding weird characters like $$#$#@$#@***$# and without html tags in the new file output.txt. Help me. Thanx in advance.
My final goal is to... (11 Replies)
Discussion started by: sachit adhikari
11 Replies
6. Shell Programming and Scripting
I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word "description" excluding weird characters like $&lmp and without html tags in the new file output.txt. Help me. Thanx in advance. I have attached the input... (4 Replies)
Discussion started by: sachit adhikari
4 Replies
7. Shell Programming and Scripting
Hi,
I am trying to search for a word and print the next word. For example:
My text is "<TRANSFORMATION TYPE ="Lookup Procedure">"
I am searching for "TYPE" and trying to print ="Lookup Procedure"
I have written a code like following:
echo $line | nawk... (4 Replies)
Discussion started by: sampoorna
4 Replies
8. Shell Programming and Scripting
Hi,
I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file.
Ex:
$ cat "sample.log"
I am searching for a word which is present in this file
We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies
9. What is on Your Mind?
Today I changed the forum mysql database to permit 2 letter searches:
ft_min_word_len=2
I rebuilt the mysql search indexes as well.
Then, I added a "quick search bar" at the top of each page.
I have tested this and two letter searches are working; but it's not perfect,... (1 Reply)
Discussion started by: Neo
1 Replies
10. UNIX for Beginners Questions & Answers
I have a multicolumn text file with header in the first row like this
The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach
for ii in ${hdr}
do
gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
LEARN ABOUT LINUX
ustrtok
ustrtok(3alleg4) Allegro manual ustrtok(3alleg4)
NAME
ustrtok - Retrieves tokens from a string. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
char *ustrtok(char *s, const char *set);
DESCRIPTION
This function retrieves tokens from `s' which are delimited by characters from `set'. To initiate the search, pass the string to be
searched as `s'. For the remaining tokens, pass NULL instead. Warning: Since ustrtok alters the string it is parsing, you should always
copy the string to a temporary buffer before parsing it. Also, this function is not re-entrant (ie. you cannot parse two strings at the
same time). Example:
char *word;
char string[]="some-words with dashes";
char *temp = ustrdup(string);
word = ustrtok(temp, " -");
while (word) {
allegro_message("Found `%s'
", word);
word = ustrtok(NULL, " -");
}
free(temp);
RETURN VALUE
Returns a pointer to the token, or NULL if no more are found.
SEE ALSO
uconvert(3alleg4), ustrchr(3alleg4), ustrrchr(3alleg4), ustrstr(3alleg4), ustrpbrk(3alleg4), ustrtok_r(3alleg4), allegro_message(3alleg4),
ustrncpy(3alleg4), exgui(3alleg4)
Allegro version 4.4.2 ustrtok(3alleg4)