9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am trying to write output to a file in columns
I have file in the follwoing:
# cat file
abc
def
#
I am trying to write next output as like
# cat file
abc 123
def 345
#
:mad: (6 Replies)
Discussion started by: Priya Amaresh
6 Replies
2. Shell Programming and Scripting
can someone please help me fix this command:
somecommand.sh | awk -F"---" 'BEGIN{count=0} /P/ && /ERROR/ {if (($3 ~ /^P$/) && ($6 ~ /ERROR/)) {print; count++ }END { print count } ;}'
basically, what i'm attempting to do here is print all the matching lines, then, at the end, print the total... (2 Replies)
Discussion started by: SkySmart
2 Replies
3. Shell Programming and Scripting
I am having an input file for eg. file.txt which contains pipe delimited rows
file.txt:
xx|yyy|zz|12|3|aaaaa|.....
yy|zz|1|3|4|xxxxx|.......
.
.
.
i want the above file name to be transformed into another file with giving input from the user and replacing the corresponding fields based... (5 Replies)
Discussion started by: rohit_shinez
5 Replies
4. Shell Programming and Scripting
I have a table with one column
File1.txt
1
2
3
4
5
6
7
8
9
10
Another table with two columns; This has got a subset of entries from File 1 but not unique because they have differing values in col 2.
File2.txt
1 a
2 d
2 f
6 r
6 e (3 Replies)
Discussion started by: cs_novice
3 Replies
5. Shell Programming and Scripting
Hi All
I am reading data from the database and writing to temporary file in the below format.
1=XP|external_component|com.adp.meetingalertemail.processing.MeetingAlertEmail|EMAILALERTPUSH|32|4#XP |classpath|/usr/home/dfusr/lib/xalan.jar:
/usr/home/dfusr/lib/xerces.jar: ... (2 Replies)
Discussion started by: rajeshorpu
2 Replies
6. Programming
I am trying to write binary data to a file. My program below:
#include <stdlib.h>
#include <stdio.h>
struct tinner {
int j;
int k;
};
struct touter {
int i;
struct tinner *inner;
};
int main() {
struct touter data;
data.i = 10;
struct tinner... (4 Replies)
Discussion started by: radiatejava
4 Replies
7. Shell Programming and Scripting
Hi All,
I need to maintain a AUDIT file in system for every incoming and outgoing file. For this i am trying to append a record by using the AWK every time the file arriving.
I have used the code as below.
AWK '{print "FILENAME IS", $1,"DATE IS", $2}' >> AUDITFILE.txt
$1 and $2 are global... (1 Reply)
Discussion started by: Raamc
1 Replies
8. UNIX for Dummies Questions & Answers
Dear All,
Need your help.
In my day to day activities I have to validate/search Excel Sheet data (eg.say Application No. 0066782345) data into the Unix environment file whether the same data is present in that file or not.
There are hundreds of records coming in excel file and I am doing grep... (1 Reply)
Discussion started by: ravijunghare
1 Replies
9. Shell Programming and Scripting
I have a file like the following
aaaaa00005bbbbb
aaaaa00108bbbbb
The code "00005" and "00108" need to be validated and the list of valid codes are stored in a database.
While I loop through the file, should call a sql statement for every records to do the validation? or is... (1 Reply)
Discussion started by: joanneho
1 Replies