Search Results

Search: Posts Made By: mora
6,306
Posted By RavinderSingh13
Hello mora, Kindly use as follows in if. ...
Hello mora,

Kindly use as follows in if.


if [[ `ls -l /tmp/file.txt | awk '{print $1}'` -eq 0 ]]


EDIT: Also to check file size zero you can do as following.


if [[ -s...
1,255
Posted By RudiC
Try alternatively:awk '1 NR==3...
Try alternatively:awk '1
NR==3 {print "DIR=/usr/CDR"}
NR==7 {print "Source=/usr/src"}
NR==28{print "Target=/usr/tgt"}
' file
2,346
Posted By cero
The script should work fine the way mora posted...
The script should work fine the way mora posted it. The at sign (@) is short for the start command and the exit command is not needed if sqlplus gets fed by a here document (or a pipe).
I suspect...
2,346
Posted By vbe
I see no exit for sqlplus... and I also am no...
I see no exit for sqlplus... and I also am no more much in oracle but at the time I used start commmand, so if I adapt your code to the way I would have done, it would give:
In /tmp/query.sql:
...
2,346
Posted By cero
SQL*Plus accepts here documents, no need for...
SQL*Plus accepts here documents, no need for expect.
What is the exact error message you see?
Remove the redirection to /dev/null and put set -x before your call to sqlplus to see what is happening.
2,346
Posted By gull04
Hi, I am not an SQL person, however I would...
Hi,

I am not an SQL person, however I would think that you'll have to use something like expect to manage that as the shell will not understand your SQL commands.

Regards

Dave
1,910
Posted By bakunin
As DonCragun rightfully stated this was a typo on...
As DonCragun rightfully stated this was a typo on my part, sorry for that.



I have to admit i do not know Teradata RDBMS at all, i am just a system administrator with a (at best rudimentary)...
1,910
Posted By Don Cragun
It looks like one character was dropped. Try: ...
It looks like one character was dropped. Try:
typeset iNumFields=$(( ${#chBuffer}+1 ))
1,910
Posted By bakunin
You could have that all in one if you could...
You could have that all in one if you could provide some details. The maximum number of delimiters (in your example "|") would be:

sed 's/[^|]//g' /path/to/input.file | sort | tail -n 1

This...
7,149
Posted By yazu
Maybe a simpler solution will be enough? sed ...
Maybe a simpler solution will be enough?
sed 's/CASH_//g; s/LOAN_//g' INPUT.FILE > OUTPUT.FILE
1,453
Posted By rdcwayx
sed '/^#Generate_file/ s/\(\.txt\)/.1cdb\1/'...
sed '/^#Generate_file/ s/\(\.txt\)/.1cdb\1/' infile
1,453
Posted By yinyuemi
awk...
awk 'BEGIN{FS=OFS="\."}NF==2&&/^#Generate_file/{$NF="1cdb."$NF}1'
1,453
Posted By ddreggors
sed 's/\.txt/\.1cdb\.txt/' infile > outfile ...
sed 's/\.txt/\.1cdb\.txt/' infile > outfile


or if you prefer to remove the need for a temp file (outfile):


sed -i 's/\.txt/\.1cdb\.txt/' infile


You can even do a pretest and print to...
1,060
Posted By panyam
To get all the non duplicate records from .txt...
To get all the non duplicate records from .txt files


find /root/neb/src/ -name '*.txt' | while read FILENAME
do
awk 'x[$0]++{next} {print $0}' < "$FILENAME" > "${FILENAME}.out"
done

...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 05:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy