10 More Discussions You Might Find Interesting
1. Red Hat
Hello all
I have a query (SQL) that returns a rather long field from an Oracle database. The field in question is defined on 400 characters but all these 400 cannot be displayed by the echo command. Thus when I launch the following command:
echo "SELECT FIELD01 FROM TABLE_NAME;" | sqlplus -s... (9 Replies)
Discussion started by: S. BASU
9 Replies
2. Shell Programming and Scripting
I have a file with data like this. I want to look for MultiLoad and pull that line and the line above. I cant use the grep -B 1 I dont have that version and cant install on the server. is there a awk or perl that will do it.
"CMPGN_RPT_DEV_TT"."text1" (TableId 0029H 5CEEH)
bypassed due to... (4 Replies)
Discussion started by: wambli
4 Replies
3. Shell Programming and Scripting
Hi,
I have this file format and can't seem to think of a solution. I need your help.
I want to return lines which says "Record" if it's ID > 0
file.txt
Record 1:
::::::::::::::::::::::
::::::::::::::::::::::
ID "000001"
::::::::::::::::::::::
::::::::::::::::::::::
... (6 Replies)
Discussion started by: jakSun8
6 Replies
4. Shell Programming and Scripting
Hi All,
Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example :
abc.txt
7000,john,2,1,0,1,6
7001,elen,2,2,0,1,7
7002,sami,2,3,0,1,6
7003,mike,1,4,0,2,1
8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
5. Shell Programming and Scripting
Hi All,
I am reading two files and writing out the file name and count of lines in each file to an output file.
My script looks like this:
echo "input_file1.out;`wc -l < input_file1.out | sed 's/^]*\(.*\)]*$/\1/'` " > comp_file1.out
echo "input_file2.out;`wc -l < input_file2.out | sed... (2 Replies)
Discussion started by: Hangman2
2 Replies
6. Shell Programming and Scripting
Hi,
I have a lot of log files which contain lines in the format of (date info) or (info), and when I use grep to search for "date" I was able to get the (date info) line, but some info lines are a separate line after the (date info) line... for example like:
(date info info info)
(date... (8 Replies)
Discussion started by: a27wang
8 Replies
7. Shell Programming and Scripting
How to do I get the return code of a subroutine in a perl module if invoke the subroutine as standalone,
I have an module say TestExit.pm and in that i have a subroutine say myTest() which is returns 12, if i were to call the subroutine from
command line like
CASE:1 ( Without an explict... (2 Replies)
Discussion started by: ennstate
2 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'.
I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies
9. Shell Programming and Scripting
Hello friends ,
I am doing the following command, but it is not wise to all files.
for temp in `find ./CSV/ -name "*.txt"`
do
sed -n -e 'N; /*Main End/p' $temp
done
Its give me the correct output for some files , but not for all files.
I mean some files contains the... (12 Replies)
Discussion started by: user_prady
12 Replies
10. UNIX for Dummies Questions & Answers
Hey guys,
I just want to grep for a line then return a few lines above it I can't seem to find what im looking for on google can someone help me out?
This is on Solaris 9.....
I don't have GNU grep so -B and -A commands will not work (3 Replies)
Discussion started by: kingdbag
3 Replies