10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am learning SED and just following the shell scripting book, i have trouble understanding the grep and sed statement,
Question : 1
__________
/opt/oracle/work/antony>cat teledir.txt
jai sharma 25853670
chanchal singhvi 9831545629
anil aggarwal 9830263298
shyam saksena 23217847
lalit... (7 Replies)
Discussion started by: Antony Ankrose
7 Replies
2. Shell Programming and Scripting
Using a regular expression, I would like multiple lines to be matched.
By default, a period (.) matches any character except newline. However, (?s) and /s modifiers are supposed to force . to accept a newline and to match any character including a newline.
However, the following two perl... (4 Replies)
Discussion started by: LessNux
4 Replies
3. Shell Programming and Scripting
Hey everyone! I am determining the best method to do what the subject of this thread says. I only have pieces to the puzzle right now. Namely this:
grep -rl "expression" . | xargs open
(I should mention that the intention is to grep through many files containing the "expression" and... (2 Replies)
Discussion started by: Alexander4444
2 Replies
4. Shell Programming and Scripting
Hello All,
I have something like below
LDC100/rel/prod/libinactrl.a
LAA2000/rel/prod/libinactrl.a
I want to remove till first forward slash that is outputshould be as below
rel/prod/libinactrl.a
rel/prod/libinactrl.a
How can I do that ??? (8 Replies)
Discussion started by: anand.shah
8 Replies
5. UNIX for Advanced & Expert Users
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies
6. Shell Programming and Scripting
Is there anyway to accomplish this?
(ksh)
FILES_TO_PROCESS='NAME1 NAME2'
SOURCE_NAME1=/tmp/myfile
TARGET_NAME1=/somewhere/else
# other file names
for i in $FILES_TO_PROCESS
do
file1=SOURCE_$i
file2=TARGET_$i
echo cp ${$file1} ${$file2} <-- how do get this to work.
done (2 Replies)
Discussion started by: koondog
2 Replies
7. Shell Programming and Scripting
Hello
I have the following output which is returned with the Month in text format instead of numerical. The output I receive is performed by using Rational Synergy CM software commands from the Unix command line and piping Unix commands on the end.
bash-3.00$ ccm query -n... (4 Replies)
Discussion started by: Glyn_Mo
4 Replies
8. Shell Programming and Scripting
Hi guys,
Is there any way this can be done, or return whether any substitutions have been made?
thanks for any input.
skinnygav (using Bash shell) (2 Replies)
Discussion started by: skinnygav
2 Replies
9. Shell Programming and Scripting
this is the content of the file:
i want to remove both the line starting with "=" and "(" but i can only remove one at a time..so how do I go about removing both of them? (15 Replies)
Discussion started by: finalight
15 Replies
10. Shell Programming and Scripting
I am writing a shell script to search for previous versions of an application...the application is called TAU and basically i want to search the users home directory and /Applications for any instances of a "TAU" folder.. If found i want to give the user the option to remove the old folders and if... (3 Replies)
Discussion started by: meskue
3 Replies