07-25-2003
Hi David,
thanks for your help !
Based on your script as shown below :
JOB_ID=`awk 'NR>=8 && NR<=9 && /[[0-9]]*/ {print}' ${SQL_LOG}`
As your /[[0-9]]* means it will get the line when it encounter any integer value ,right ??
so even if i wanted to cut a sentence in row 10 with 1111 on it , i could use the below script :
JOB_ID=`awk 'NR=10 && /[[0-9]]*/ {print}' ${SQL_LOG}`
Am i right??
thanks a lot!!
Last edited by blueberry80; 07-25-2003 at 11:03 AM..
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi to all
i wrote a script to cut a word from the file....that works only if the word is fixed field.
example..
sed -n '1p'|awk '{ print $2 }'|cut -d '(' -f2|sed 's/(//'|sed 's/)//'|sed 's/"//g' filename
i know that word is starting with "app" then "(" ----> ex: app("xxxx").
it... (2 Replies)
Discussion started by: honeym210
2 Replies
2. Shell Programming and Scripting
When I run the script I have just created, I get a strange scenario around the following code:
echo "Check for duplicate UID's, each user should have a unique user ID (UID)"
echo "IF a UID is displayed fix or document why it is required!"
echo "Press enter to continue!"
read a
cut... (1 Reply)
Discussion started by: sport
1 Replies
3. UNIX for Dummies Questions & Answers
Hi i want to cut the first field of this output obtained form sql script
more dxlocks_test.log.1
SID SERIAL# SPID
---------- ---------- ---------
25 18356 1029
78 39370 1025
136 14361 1027
================================
cut -f1... (2 Replies)
Discussion started by: aishwaryakala
2 Replies
4. Shell Programming and Scripting
Hi all,
I'm trying to extract string from variable in BASH. That's probably trivial for grep but I couldn't figure it out.
I want to get name, there's sometimes digit after it, but it should be left out.
STRING=http://name5.domain.com:8000/file.dat
Could someone help me with that?
Any... (10 Replies)
Discussion started by: cootue
10 Replies
5. UNIX for Dummies Questions & Answers
Hello people,
I have a little script that has to compare some files (exe files)... so i find all the files in the given paths (2 paths) and it generates 2 txt files (named 1.txt and 2.txt, they have to be identical) i need to have a little IF function to compare the 2 files and see if they are... (2 Replies)
Discussion started by: valiadi
2 Replies
6. Shell Programming and Scripting
Hi All,
Am a Beginner to shell scripting, so please pardon my question.
Below is the file format of file a.txt
a.txt
F=3
a|b|c|d
1|2|3|4
as|as|asd|asd
Aas|as|asd|ada
In the above file format, i have record count of total no of records excluding the header file here 3 , this varies... (2 Replies)
Discussion started by: sp999
2 Replies
7. Shell Programming and Scripting
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies
8. Shell Programming and Scripting
Hi,
I need a script which do below
I have a filename: TEST2013_09_17_XX_XX_XX.csv
Now script should create a new file with name: XX_XX_XX.csv
Or I should say i need the output as XX_XX_XX.csv
Please help. Mant thanks in advance (3 Replies)
Discussion started by: sv0081493
3 Replies
9. Shell Programming and Scripting
I am using : << cut / cut to comment out block of code.
Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines.
The "warning " is at last line of script.
done < results
169 echo "END read all positioning parameters"
170... (8 Replies)
Discussion started by: annacreek
8 Replies
LEARN ABOUT ULTRIX
condredirect
condredirect(1) General Commands Manual condredirect(1)
NAME
condredirect - perhaps redirect mail to another address
SYNOPSIS
in .qmail: |condredirect newaddress program [ arg ... ]
DESCRIPTION
condredirect feeds each new mail message to program with the given arguments. If program exits 0, condredirect forwards the mail message
to newaddress, and then exits 99, so further commands in .qmail are ignored.
If program exits 111, condredirect exits 111, so delivery will be retried later.
If program exits anything else (or does not exist), condredirect exits 0, so the rest of .qmail will be processed as usual.
Note that it is not safe for program to fork a child that reads the message in the background.
WARNING: If you create a .qmail file to enable condredirect, make sure to also add a line specifying delivery to your normal mailbox.
SEE ALSO
bouncesaying(1), except(1), dot-qmail(5), qmail-command(8), qmail-queue(8)
condredirect(1)