question on sed grep awk from variable


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting question on sed grep awk from variable
# 8  
Old 08-11-2006
Quote:
Originally Posted by vgersh99
what OS are you on?
Solaris10

# uname -a
SunOS test 5.10 Generic_118822-27 sun4u sparc SUNW,Ultra-250
# echo $0
-ksh
# 9  
Old 08-11-2006
see the last post
# 10  
Old 08-11-2006
Quote:
Originally Posted by 3Gmobile
Solaris10

# uname -a
SunOS test 5.10 Generic_118822-27 sun4u sparc SUNW,Ultra-250
# echo $0
-ksh
thanks i got it, the grep is different ??
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep / awk /sed question

Hi All, I have a file with following sample data. I am also attaching the file. (Est) (Est) Jobs Sch Workstation Job Stream SchedTime State Pr Start Elapse # OK Lim POOL #ACR_BILLING 0005 08/15 ... (2 Replies)
Discussion started by: Kevin Tivoli
2 Replies

2. Shell Programming and Scripting

awk question : system output to awk variable.

Hi Experts, I am trying to get system output to capture inside awk , but not working: Please advise if this is possible : I am trying something like this but not working, the output is coming wrong: echo "" | awk '{d=system ("date") ; print "Current date is:" , d }' Thanks, (5 Replies)
Discussion started by: rveri
5 Replies

3. Shell Programming and Scripting

Assign grep match to variable question

Hi, I'm trying to assign a grep result to a variable but instead of having all grep result's assigned to the variable, would it be possible to assign the first match, do something, then move onto the next match and assign it to that variable and so on until all matches have been completed I... (4 Replies)
Discussion started by: Jazmania
4 Replies

4. Shell Programming and Scripting

Question grep and sed

hi everybody i have this script and it work's if i use a single variable in grep, but when i put $searchterm_ the script stops work i have a problem too in sed, because i don't know how i can search and replace more than one item, in this case is >>> $searchterm/$replaceterm and... (4 Replies)
Discussion started by: felito
4 Replies

5. UNIX for Dummies Questions & Answers

sed/grep string replace question

Hi all, I know this question has probably been answered before, but I am struggling with this problem, even after googling a million pages. In a file named rdmt.conf I need a single character replaced, the number in the line below CUR_OC4J_ID=1 It will always appear after... (3 Replies)
Discussion started by: Mike AAA
3 Replies

6. Shell Programming and Scripting

BASH: How do I grep on a variable? (or simmilar question that makes sense)

Hi, I've been running code which very frequently calls books.csv. e.g: grep -i horror books.csv > tempExcept, I'm trying to move away from using temporary files or frequently calling books.csv to improve efficiency. So I tried something like bookfile=$(cat books.csv) grep -i horror... (4 Replies)
Discussion started by: Quan
4 Replies

7. Shell Programming and Scripting

General question about the relationship between KSH and sed/grep/awk etc

Greetings all, Unix rookie here, just diving into ksh scripting for the first time. My question may seem confusing but please bear with me: If I'm understanding everything I'm reading properly, it seems like the ksh language itself doesn't have a lot of string manipulation functions of... (2 Replies)
Discussion started by: DalTXColtsFan
2 Replies

8. Shell Programming and Scripting

assign subst|grep|sed command result to a variable

Hi, I'm quite new to scripting and I want to modify following line of an existing script: MYVAR=`subst |grep 'L:\\\:' | sed -e 's/.*\\\//'`; What I have to do is to use the content of a variable instead of the constant expression 'L:\\\:' as the grep string to be matched. Assuming I already... (5 Replies)
Discussion started by: snowbiker99
5 Replies

9. Shell Programming and Scripting

sed / grep question

Hello, I am new to shell scripting. I have a input file: Few lines of the input file has the following. /a0012/abcd12/abcd12 /a0003/xyzab1/lmno123 /a0006/pqrst1/abcde12 In my output file, I only need to get anything that is between the first and second '/' of each line: exampple:... (6 Replies)
Discussion started by: hemangjani
6 Replies

10. Shell Programming and Scripting

grep & sed question

I'm trying to write a bash script to perform a tedious task, but I have no experience and hardly any knowledge so I've been having a rough time with it. I'm on Mac OS X, and I want a script to do the following: I have a directory that has about 200 sudirectories. In each of these directories,... (1 Reply)
Discussion started by: der Kopf
1 Replies
Login or Register to Ask a Question