10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Example:
$ cat file1
2
3$ cat file2
1
2
3
4
5
6The following awk script works like a charm, NR==FNR is true for file1, the remainder runs for file2:
awk '
NR==FNR {A; next}
($1 in A)
' file1 file2
2
3Now have an empty file1:
>file1and run the awk script again.
The result is empty... (8 Replies)
Discussion started by: MadeInGermany
8 Replies
2. Shell Programming and Scripting
#!/bin/sh
label:
echo sql poll
v=`sqlplus -s <<!
HR/HR
set pages 0 echo off feed off
select distinct status from
emp
where
id=5;
!
`
echo $v;
echo it comes here after false
if
then
echo if condition true
sqlplus -l scott/tiger <<EOF
select * from department;
EXIT (2 Replies)
Discussion started by: kumaar1986
2 Replies
3. Shell Programming and Scripting
Hi,
I have a large number of input files with two columns of numbers.
For example:
83 1453
99 3255
99 8482
99 7372
83 175
I only wish to retain lines where the numbers fullfil two requirements. E.g:
=83
1000<=<=2000
To do this I use the following... (10 Replies)
Discussion started by: s052866
10 Replies
4. Solaris
Is there any other editor, installed by 'default' in Sparc Solaris10, besides vi?
I'd like to avoid installing anything new.
If not, how to make vi more user-friendly?
thanks. (8 Replies)
Discussion started by: orange47
8 Replies
5. Shell Programming and Scripting
Hi techies ..
This is my first posting hr ..
Am facing a serious performance problem in counting the number of lines in the file. The input files i get will be in some 10 to 15 Gb of size or even sometimes more ..and I will load it to db
I have used wc -l to confirm whether the loader... (14 Replies)
Discussion started by: rajesh_2383
14 Replies
6. Shell Programming and Scripting
I usually just browse the forum/google for answers, however I've been stuck on a problem for a number of hours now and I've decided to join up and actually ask I've searched the forum ad naseum in an attempt to find answer to my query, however so far I have been unsuccessful.
I'm no expert... (3 Replies)
Discussion started by: gtc
3 Replies
7. HP-UX
Hello to all board members!!
I have a problem on a HP-UX system. I should write a script. Therefore I need to search after IP addresses in the output of a command.
On Debian this works: ifconfig | egrep -o "{1,3}\.{1,3}\.{1,3}\.{1,3}"
The script where i need this is not ifconfig, but... (2 Replies)
Discussion started by: vostro
2 Replies
8. Shell Programming and Scripting
Hi... I want to know whether if there is any alternative for cron.:confused:
I had written a script which checks for all system/application processes every 15 min(placed in cron though). But looks funny - what if cron daemon isn't running!! and expecting that script to update the OUTPUT FILE... (5 Replies)
Discussion started by: reddybs
5 Replies
9. Shell Programming and Scripting
I'm trying the following as i wish to get the last field in a report containing several fields, each line can have more fields than the previous, so I tried
rvwords=`echo $rvstatus |wc -w`
rvstat=`echo $rvstatus |cut -f $rvwords`
but it prints the whole variable contents of $rvstatus rather... (6 Replies)
Discussion started by: gefa
6 Replies
10. Shell Programming and Scripting
I have a 1-column file with
random numbers. this script runs
to subtract 1 to the number and
written to a file. With over
10,000 lines, it takes >2 minutes
to complete the loop operation.
is there an alternative awk/sed
for looping to reduce the wait?
Thanks!
#!/bin/ksh
for N in `cat... (2 Replies)
Discussion started by: apalex
2 Replies