10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi there, Unixers
I need to extract ALL the words from a text which aresurrounded by square brackets. I am using this piece of code
sed 's/.*\.*/\1/g' inputfile > outputfile
but I only get one word for every paragraph, why?
Please use CODE tags as required by forum rules! (7 Replies)
Discussion started by: eldeingles
7 Replies
2. Shell Programming and Scripting
I have a sample text file with file name: sample.txt
The text file has the following text.
this is an example text where we have to extract certain words before and after certain word these words can be used later to get more information
I want to extract n (a constant) words before and... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
3. Shell Programming and Scripting
Hello,
Currently, I have this output from my application :
-------------------------------------------------
Log viewer/Tmp1 (Jun 29 2011 09:48)
-------------------------------------------------
BlalbalbaBlalbalba..Blalbalba..Blalbalba..Blalbalba..Blalbalba..Blalbalba..Blalbalba....... (3 Replies)
Discussion started by: acidoangel
3 Replies
4. Shell Programming and Scripting
I'm trying to check if a variable'd string is only one character and use that in an if statement the only way I could find is:
$expr "${var}" : . # expr STRING : regrep
where the "." is the grep wildcard for any single character.
Whats wrong with my code here and is there a... (3 Replies)
Discussion started by: Tewg
3 Replies
5. UNIX for Dummies Questions & Answers
Hi there, Unix Gurus
Working with big listings of english sentences for my pupils, of the type:
1. If the boss's son had been , someone would have asked for money by now.
2. Look, I haven't a crime, so why can't you let me go?
....
I wondered how to extract the words between brackets in... (7 Replies)
Discussion started by: eldeingles
7 Replies
6. Shell Programming and Scripting
Dear Folks,
I am a newbee to UNIX. I want to extract the SQLSTATE from a log file. For example the log file content is
SQL0010N The string constant beginning with "' from table1 a, table 2" does not have
an ending string delimiter. SQLSTATE=42603
when I give the the command as ... (4 Replies)
Discussion started by: dinesh1985
4 Replies
7. Shell Programming and Scripting
Hi
Can anyone explain me the usage of this command and the arguments used here and what will be the expected output :
v_num=`expr nav_d_20100204_1759 : '*\(*\)'`
what will be the value returned in v_num.
Thanks in Advance!!!
Regards
Naveen Purbia (3 Replies)
Discussion started by: trying_myluck
3 Replies
8. UNIX for Dummies Questions & Answers
Hi friends
how can i execute expr $va1 * $var2
provided i m not supposed to use '/' also the
nglob variable is turned off. (4 Replies)
Discussion started by: ashishj
4 Replies
9. UNIX for Advanced & Expert Users
Hi, Can anyone please let me know, how to extract two lines at the same time. In specific,I have a file containing list of devices, such as router1 and switch2 below. I want to get all the lines which has "#" and all the lines which has "down"
router1#sh ip int br
Interface ... (6 Replies)
Discussion started by: Aejaz
6 Replies
10. UNIX for Dummies Questions & Answers
I am looking for the correct syntax on the expr command in UNIX. I have a script that I am building at the moment. the script is creating file1 that is an actual .sql file that is going inside the oracle database to get some information in there. It take that information, puts it inside another... (2 Replies)
Discussion started by: wolf
2 Replies