10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I have a text file, i want to search for a string in it and the string is repeated multiple times in a file i want to get the first occurence of the string in a variable.
the content of file is like:
I want to grepthe first occurance of "Configuration flow done" and store the... (7 Replies)
Discussion started by: anand2308
7 Replies
2. Shell Programming and Scripting
Hi folks.
I am trying to script a query of a backup server that will display sessions that are "waiting" for a mount...
So for, i query my system which returns a process # that is waiting...
The output looks like this:
20,984 Backup Storage Pool Primary Pool T950_TAPE_WIN, Copy Pool... (3 Replies)
Discussion started by: Stephan
3 Replies
3. Shell Programming and Scripting
Hi,
i am looking for a command that can help me find the last Sting in a Line
ex.. yyeyrtehhehrerry: change this from to
here i want to extract END. (5 Replies)
Discussion started by: Rohit1234
5 Replies
4. Shell Programming and Scripting
finding a string with another string is found
EX:
abs c/-
i want to find /-, then copy abs. i know it's easy use awk, but my problem is the substr syntax.
substr($2,2,2) will give me /-
but the conflict is /- is not always the second characted of the second string. (11 Replies)
Discussion started by: engr.jay
11 Replies
5. UNIX for Dummies Questions & Answers
I'm a relative newbie and apologize if this is silly... Suppose I have a file with English words and their Spanish translations. I read them in like this:
while(getline < myfile > 0) {
eng = $1
SPAN = $2
}
Now, for every eng in SPAN, I want to scan through SPAN and search for a... (2 Replies)
Discussion started by: DrLeeDetroit
2 Replies
6. Shell Programming and Scripting
How to check whether a particular string contains dot or not?
Here I can not use grep as the string is not in a file. I will get this string from user input
Thanks, (2 Replies)
Discussion started by: balamv
2 Replies
7. Shell Programming and Scripting
Dear experts,
Ive been trying to figure this out for a while, but i cant. Please help.
I have a file, with approx 1 million lines. The contents are separated with "----------". Please see example below
So my problem is, i need to find all texts that have the keyword "GAA", but i need... (14 Replies)
Discussion started by: aismann
14 Replies
8. Shell Programming and Scripting
Hi
I am creating a script in shell (sh), in which i will enter a string at runtime. let i will enter the string asdfergtdev_DEV2(or DEV,DEV3,DEV1 etc). i want it will find DEV2(it will be only find DEV2 at last 4 digit 3 in case only DEV,no metter if before it, there is dev) and append _qqq01... (1 Reply)
Discussion started by: inderpunj
1 Replies
9. UNIX for Advanced & Expert Users
hi all..
I dont know how to search for a string in a file.. I have tried doing.. I did google but didnt get effective answers..my code is as follows:
int search(char* filename,const char*
username,const char* passwd)
{
int flag=0;
unsigned long fsize=0;
unsigned long current=0;... (2 Replies)
Discussion started by: Ume1986
2 Replies
10. Shell Programming and Scripting
Hi I am very new to KSH programming
and need some help with finding a string in an error log
currently i am doing
cat FTP_LOG.lis | grep Warning
which gives me
Warning: Authentication failed. Remaining authentication methods: 'publickey,pas
I want to only pick up the test between the... (4 Replies)
Discussion started by: DAFNIX
4 Replies