I have the data set as below,
The following shell will check for the first field and append the second field values to a single record if the first field value is common, say it will be like,
Now the requirement is, if we have more than two records for the same first field, we should only append the second filed of these first two records, others has to be omitted,
Please let me know what modifications need to be done in below script
Last edited by Franklin52; 09-26-2012 at 10:22 AM..
Reason: Please use code tags for data and code samples
I believe i have most of samba configured right but i get this error each time time try to run it. I was given suggestion that i touch the file, i did, but i still cannot rid myself of this error.
Any suggestions (2 Replies)
I have a shell script that is looping through a list of Postscript files to print.
ls -1tr *.PS > print.lst
...
PRINT_LIST=`cat print.lst`
...
for DMFILE in $PRINT_LIST
do
lp -d $PRINTER_NAME -o legal $DMFILE
...
done
The files in print.lst are in the order that they should be... (2 Replies)
i need to execute 5 jobs at a time in background and need to get the exit status of all the jobs i wrote small script below , i'm not sure this is right way to do it.any ideas please help.
$cat run_job.ksh
#!/usr/bin/ksh
####################################
typeset -u SCHEMA_NAME=$1
... (1 Reply)
Hi,
I would like to be able to return to the messages printed in the shell when a process is done, but I have no idea where to look for them.
Done nohup script.sh (wd: ~/somesubdir)
Can anyone give me a hint? Are these messages printed by bash? They're definitely not... (7 Replies)
Hello, I find the value printed by gdb does not consist with the right value.The following is the output.
(gdb)
7 while ( ( optc = getopt(argc, argv, ":b:B:h" ) ) != -1 ) {
(gdb)
8 printf( "%c %d %s\n", optc, optind, optarg);
(gdb)
B 5 1-2
7 while ( ( optc =... (1 Reply)
Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine?
Thanks in advance. (3 Replies)
Hi,
I ma trying to do this but don't know why it is not happening?
$r1=10
for i in "1" "2" "3" "4"; do x=`eval echo $i`; echo r${x}; done
output:
r1
r2
r3
r4
also tried
for i in "1" "2" "3" "4"; do x=`eval echo $i`; echo $r${x}; done
output:
1 (2 Replies)
Hi all I'm using below code
#!/bin/bash
export fileclob
cd /home/appsuser/dataload
file='EG.mdd'
chmod 777 $file
dos2unix -ascii -k -q -o $file $file
sed -e '${/^$/d}' $file
cat $file | while read LINE
do
echo "line is"
if
then
echo "line is $LINE"
echo " "
... (10 Replies)
Dear Team
I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update )
Scenario
We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)