Search Results

Search: Posts Made By: only4satish
2,854
Posted By Yoda
Just invoke script_B right after creation of...
Just invoke script_B right after creation of table: temp1 inside script_A:-

script_A
#!/bin/ksh

# Some code here

sqlplus -s ${user}@${pass}@${inst} << EOF
create table temp1 as select ......
2,854
Posted By mjf
One option is to move table creation step in...
One option is to move table creation step in script A to a new script then make both script A and B dependent on this new script and fire off in parallel.

Or, you could update script B to check...
2,854
Posted By hicksd8
What I am about to say assumes that table temp1...
What I am about to say assumes that table temp1 is a file.

If it is then:

1. At the end of script B ensure that temp1 is either deleted or renamed so that it doesn't exist anymore.

2. At...
2,854
Posted By bakunin
You could have different scripts for the two...
You could have different scripts for the two tasks and run one (or both) in background. You will still have to use some sort of inter-process-communication to make sure the one starts only when the...
2,046
Posted By Jotne
https://www.unix.com/shell-programming-scripting/15...
https://www.unix.com/shell-programming-scripting/153131-remove-duplicate-lines-using-awk.html
Only difference, is that in this case, only look at column #1
2,046
Posted By Homa
PERFECT! It worked, thank you very very much.
PERFECT! It worked, thank you very very much.
1,288
Posted By Yoda
No need to assign it to a variable, simply do:- ...
No need to assign it to a variable, simply do:-
echo "Tapes are : $x
Holders are : $y" | mailx -s "Alert" xyz@abc.com
1,380
Posted By Yoda
filename="server1-ips-ultranoob-ok_From_2012_21_12...
filename="server1-ips-ultranoob-ok_From_2012_21_12-23:40:23_To_2012_21_12-23:49:45.zip"
DT=$( echo $filename | awk -F"From_" ' { print substr($2,1,10) } ' )
echo $DT
2012_21_12
Forum: Linux 11-21-2012
4,018
Posted By Skrynesaver
hideous, but it works ls -ltr $(date ...
hideous, but it works
ls -ltr $(date +%Y%m%d)*.xml | head -$(( $(ls -ltr $(date +%Y%m%d)*.xml | wc -l) - 1 ))And Bartus' solution above is infinitely better, reminding me once again that I must...
1,221
Posted By Yoda
Using shell script:- sort -u File_1 | while...
Using shell script:-
sort -u File_1 | while read email_addr
do
grep $email_addr File_2 > Error.txt
( uuencode Error.txt Error.txt; ) | mailx -m -s "Error" $email_addr
done
8,770
Posted By Yoda
( cat body.txt; uuencode file1 file1; uuencode...
( cat body.txt; uuencode file1 file1; uuencode file2 file2; ) | mailx -m -s "Att" user@domain.com
8,770
Posted By subramanian
try this (cat body ; uuencode attch1 attch1) |...
try this
(cat body ; uuencode attch1 attch1) | mailx -m -s "testing" "abc@gmail.com"
29,803
Posted By Corona688
This will fail in many systems because -f will...
This will fail in many systems because -f will get confused when given more than one argument.

I'd use a for-loop instead, breaking so it only runs once. Or not, if you want to run it over all...
6,290
Posted By Don Cragun
Your problem in awk was that /sqry/ was looking...
Your problem in awk was that /sqry/ was looking for a line containing the literal string sqry not the string contained in the variable sqry. To do what you were trying to do in awk, you could have...
6,290
Posted By Scrutinizer
For reference, awk use of variables. There is no...
For reference, awk use of variables. There is no need to escape the double quote:
awk '$0~b,$0~e' b='select_id="x_0' e='from' infile


--
On Solaris, use /usr/xpg4/bin/awk
6,290
Posted By Mudshark
Thanks msabhi . I'm using ksh on Solaris. This...
Thanks msabhi .
I'm using ksh on Solaris. This variation worked.
sed -n -e "/$var/,/from/p" x.txt
2,557
Posted By complex.invoke
sed 's!\([^ ]*\) \{1,\}\([^_]*\)\([^ ]*\)...
sed 's!\([^ ]*\) \{1,\}\([^_]*\)\([^ ]*\) \{1,\}\([^ ]*\).*!\1 \2 \4!g' infile
2,557
Posted By elixir_sinari
Must have been a typo. The quantifier * is for...
Must have been a typo.
The quantifier * is for matching 0 or more occurrences of the previous character/expression.
2,557
Posted By itkamaraj
* is to match the 1 or more number of the...
* is to match the 1 or more number of the matching characters.

.* is to match any character for 1 or more time.

$ echo "GSM2_B71.WORLD_20121114130908.log" | awk 'sub("B71*","")'...
20,728
Posted By Don Cragun
Search for _log in $1 and if found change it to...
Search for _log in $1 and if found change it to an empty string. In other words if the first field in the input record contains _log, remove those four characters from that field.
20,728
Posted By ctsgnb
Assuming the rest of your file have the same...
Assuming the rest of your file have the same formatting than the lines of your example:

sed 's:/rakesh/:rakesh:' input

or

sed '/rakesh/s:/::g' input
20,728
Posted By Don Cragun
You aren't quoting the separator character...
You aren't quoting the separator character correctly in this case where some of the characters you're trying to match are separator characters. When you need to look for and replace a / character,...
20,728
Posted By Don Cragun
In sed, s is the substitute command. In this...
In sed, s is the substitute command. In this case, it is telling sed to change a space to a space followed by a double quote, and the 2 says to make the change to the 2nd occurrence of space on the...
1,798
Posted By complex.invoke
sed 's!/rakesh/!rakesh!g' sample.txt or ...
sed 's!/rakesh/!rakesh!g' sample.txt

or

sed '/rakesh/s!/!!g' sample.txt
20,728
Posted By ctsgnb
Assuming your comments do not contain...
Assuming your comments do not contain doublequote:
sed 's/ / "/2;s/$/"/' yourfile | xargs -n1
Showing results 1 to 25 of 27

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