10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Experts..
I have 3-4 C codes with Oracle SQL statements embedded. All the SQL statements starts with EXEC SQL keyword and ends with ;. I want to extract all the SQL statements out of these codes.
I did awk '/^EXEC SQL/,/\;/' inputFile (I use this on all of the codes individually). That... (2 Replies)
Discussion started by: juzz4fun
2 Replies
2. Shell Programming and Scripting
Hi,
I have a text file containing 2 lines as follows:
I'm trying to extract all the strings following an "AME." The output would be as follows:
BUSINESS_UNIT
PROJECT_ID
ACTIVITY_ID
RES_USER1
RESOURCE_ID_FROM
ANALYSIS_TYPE
BI_DISTRIB_STATUS
BUSINESS_UNIT
PROJECT_ID
ACTIVITY_ID... (5 Replies)
Discussion started by: simpletech369
5 Replies
3. Shell Programming and Scripting
Hello,
I have huge number files in a directory. All files have the data. I want extract data. I want all output write to single csv file.
following codes works. Thank you very much for help.
sed -n '/.*Content$txtE_Zip" type="text" value="\(*\)" maxlength.*/s//\1/p' *>file1
sed -n... (5 Replies)
Discussion started by: hoo
5 Replies
4. Shell Programming and Scripting
Given a file with contents
/arch/powerpc/boot/4xx.o
> /arch/powerpc/boot/.4xx.o.cmd
> /arch/powerpc/boot/addnote
5766a5769
> /arch/powerpc/boot/.addnote.cmd
5768a5772,5773
> /arch/powerpc/boot/bamboo.o
> /arch/powerpc/boot/.bamboo.o.cmd
5769a5775,5778
> /arch/powerpc/boot/cpm-serial.o... (8 Replies)
Discussion started by: xerox
8 Replies
5. Shell Programming and Scripting
Hello,
I am new to sed and am trying to extract a word using sed.
for example i have a line "const TotalAmount& getTotalAmount() const; " in the file test.txt
I am trying to extract getTotalAmount() from the line.
For this i tried
cat test.txt | sed -n 's/.*get*\(\)//p
But... (8 Replies)
Discussion started by: prasbala
8 Replies
6. Shell Programming and Scripting
Hi all and greetings from Ireland!
I have not used much unix or awk/sed in years and have forgotten a lot.
Easy enough query tho.
I am cleansing/fixing 10,000 postal addresses using global replacements.
I have 2 pipe delimited files , one is basically a spell checker for geographical... (4 Replies)
Discussion started by: dewsbury
4 Replies
7. Shell Programming and Scripting
Hi,
Please let me know how do we write a piece of code to extract characters from a line using SED. (2 Replies)
Discussion started by: Shilpi
2 Replies
8. UNIX for Dummies Questions & Answers
Hi again. Sorry if it seems like I'm spamming the boards a bit, but I figured I might as well ask all the questions I need answers to at once, and hopefully at least get some.
I have installed Solaris 10 on a server. The default text editors are there (vi, ex, ed, maybe others, I know emacs is... (4 Replies)
Discussion started by: EugeneG
4 Replies
9. UNIX for Dummies Questions & Answers
I have a line like:
"Jun 19 12:56:22 routername 45454:"
I want to keep all information except the seconds of the time. I tried:
sed 's/..:..:../..:../g'
but apparently I'm on the wrong track, because although that matches on the time, it replaces it with the literal ..:..
How... (6 Replies)
Discussion started by: earnstaf
6 Replies
10. Shell Programming and Scripting
I am trying to extract "securitySettings" out of line:
<a ref ="http://localhost:5654/securitySettings">
using sed as follows:
name = `grep "localhost" file.html | sed -n 's/.**\/\(.*)/\">/\1/p'`
But it didn't run, seems have some syntax error. Do anybody knows why?
Thank you very... (11 Replies)
Discussion started by: zhen
11 Replies