10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
As part of some report generation, I've written a script to fetch the values from DB. But, unluckily, for certain Time ranges(1-9.99,10-19.99 etc), I don't have data in DB.
In such cases, I would like to write zero (0) instead of empty. The desired output will be exported to csv file.
... (1 Reply)
Discussion started by: kumar_karpuram
1 Replies
2. Shell Programming and Scripting
Hi,
I want to know if there is any simple approach to SUM a field based on group by of different fields
for e.g.
file1.txt contains below data
20160622|XXX1||50.00||50.00|MONEY|Plan1|
20160622|XXX1||100.00||100.00|MONEY|Plan1|
20160623|XXX1||25.00||25.00|MONEY|Plan1|... (3 Replies)
Discussion started by: cnu_theprince
3 Replies
3. Shell Programming and Scripting
HI ,
There are more than 100 zip files in a directory and i wanted to see if there is a max1157.txt file in any of the zip files without actually unzipping them. Could you please help. Thanks in Advance.
Karthik. (6 Replies)
Discussion started by: karthikk0508
6 Replies
4. Shell Programming and Scripting
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Discussion started by: tenteyu
1 Replies
5. Shell Programming and Scripting
/etc/group
tiadm::345:mk789,po312,jo343,ju454,ko453,yx879,iy345,hn453
bin::2:root,daemon
sys::3:root,bin,adm
adm::4:root,daemon
uucp::5:root
/etc/passwd
mk789:x:234:1::/export/home/dummy:/bin/sh
po312:x:234:1::/export/home/dummy:/bin/sh
ju454:x:234:1::/export/home/dummy:/bin/sh... (6 Replies)
Discussion started by: chidori
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I will execute a query in sqlplus and redirect to a file.
The file will contains the date value such as 2011-04-12 02:00:00.
i want to make the content of the file such as,
select * from table where col1>to_date('2011-04-12 02:00:00','yyyy-mm-dd HH24:MI:SS').
Apar from the bold... (1 Reply)
Discussion started by: pandeesh
1 Replies
7. Shell Programming and Scripting
Hi,
I'm trying to form an insert sql query using shell programming. I have table named company with four columns 'company name', 'company id', 'company code' and 'last change id'
I have to read the company name, company code and last change id from a file delimited by | which has around 10... (4 Replies)
Discussion started by: rakesh_s
4 Replies
8. Shell Programming and Scripting
I've this file and need to sort the data in each group
File would look like this ...
cat file1.txt
Reason : ABC
12345-0023
32123-5400
32442-5333
Reason : DEF
42523-3453
23345-3311
Reason : HIJ
454553-0001
I would like to sort each group on the last 4 fileds and print them... (11 Replies)
Discussion started by: prash184u
11 Replies
9. UNIX for Dummies Questions & Answers
if the key (A or B or ...others) has 4 in its 3rd column the 1st A row has to form 4 dupicates along with the all the values of A in 4th column (2.9, 3.8, 4.2) .
Hope I explain the question clearly.
Cheers
Ruby
input
"A" 1 4 2.9
"A" 2 5 ... (7 Replies)
Discussion started by: ruby_sgp
7 Replies
10. Shell Programming and Scripting
Many of my servers' /etc/group file have many userid's that does not exist in /etc/passwd file and they need to be deleted.
This happened due to manual manipulation of /etc/passwd files.
I need to do this for 40 servers.
Can anyone help me in achieving this? Even reducing a step or two will be... (6 Replies)
Discussion started by: pdtak
6 Replies