10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
2. Shell Programming and Scripting
Below code extracts multiple field values from XML into array and prints all in one line.
perl -nle '@r=/(?: jndiName| authDataAlias| value| minConnections| maxConnections| connectionTimeout| name)="(+)/g and print join ",",$ENV{tIPnSCOPE},$ENV{pr
ovider},$ENV{impClassName},@r' server.xml
... (4 Replies)
Discussion started by: kchinnam
4 Replies
3. Shell Programming and Scripting
Hi. I'm having trouble writing a wrapper script for the command line text editor gnu ed.
I want to be able to run the following algorithm on ed:
1. Display, on stdout, a command which I intend to feed into ed (before I actually feed it to ed).
2. Actually feed the command into ed's stdin.... (2 Replies)
Discussion started by: vomv1988
2 Replies
4. UNIX for Dummies Questions & Answers
Hi Guys,
Can someone help me with a way to extract text between two words on a single line.
For example if the file has below content I want to extract all text between b and f inclusive of b and f. Aparently sed does this but does it line by line and I guess it cannot read word by word.
... (11 Replies)
Discussion started by: krishnaux
11 Replies
5. Shell Programming and Scripting
I'm writing a script (C shell) to search for a pattern in file. For example
scriptname pattern file1 file2 filenN
I use for loop to loop through arguments argv, and it does the job if all arguments are supplied. However if only one argument is supplied (in that case pattern ) it should ask to... (5 Replies)
Discussion started by: patryk44
5 Replies
6. Shell Programming and Scripting
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
Discussion started by: aemunathan
1 Replies
7. Shell Programming and Scripting
Hello,
i would like to alias aptitude install for sudo aptitude install, is it possible, and how ?
i read the man alias page, but i think i have to use something with \ or { but i don't know exactly what. (3 Replies)
Discussion started by: harlock59
3 Replies
8. UNIX for Dummies Questions & Answers
within a unix window, how do you setup your session to extend a word, by hitting the "esc" key twice.
e.g.
ls -la scri (esc key, esc key)
thankyou (6 Replies)
Discussion started by: venhart
6 Replies
9. UNIX for Dummies Questions & Answers
i tried resize command , but it's not working...... (4 Replies)
Discussion started by: gaurav123
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Let me explain the problem clearly:
Let the entries in my file be:
lion,tiger,bear
apple,mango,orange,apple,grape
unix,windows,solaris,windows,linux
red,blue,green,yellow
orange,maroon,pink,violet,orange,pink
Can we detect the lines in which one of the words(separated by field... (8 Replies)
Discussion started by: srinivasan_85
8 Replies