10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
I need to split a pipe de-limited file based on the COLUMN 7 value . If the column value changes I need to split the file
Source File
Payment|ID|DATE|TIME|CONTROLNUMBER|NUMBER|NAME|INDICATOR
42156974|1137937|10/1/2018|104440|4232|2054391|CARE|1... (9 Replies)
Discussion started by: rosebud123
9 Replies
2. Shell Programming and Scripting
I am trying to run the awk below. My question is when I split the input, then run anotherawk to perform a calculation using that splitas the input there are no issues. When I try to combine them the output is not correct, is the split not working or did I do it wrong? Thank you :).
input
... (8 Replies)
Discussion started by: cmccabe
8 Replies
3. Shell Programming and Scripting
Dear all,
I am using the awk 'split' command to get the particular value.
FILE=InputFile_009_0.txt
Temp=$(echo $FILE | awk '{split($FILE, a, "e_"); print a}')
I would like to have the Temp take the value as : _009_0
... (4 Replies)
Discussion started by: emily
4 Replies
4. Shell Programming and Scripting
Hi,
There is an awk command in script and it is running successfully.
I want to split that command in 2 lines.
I have tried using '\' but its not working..
Please suggest me the solution. (11 Replies)
Discussion started by: Sanket Dalvi
11 Replies
5. Shell Programming and Scripting
awk 'FNR == 1 { c = 1 } { print > (f c) } !FNR%n { close(f c); ++c }' n=$files_per_stream f=$input_path/filename_ $input_file
$input_file with some records are splitted into files named filename_1,filename_2...etc according to $files_per_stream.
Plz help me know how and if anyone has... (7 Replies)
Discussion started by: guptam
7 Replies
6. Shell Programming and Scripting
Hi
I have few files with format access.2Nov-12:15AM.
These files will be generated daily . I need to write a script so that if today's date is less than 10 then it has to zip the file and rename it to
acess.02Nov-12:15AM.gz .please help me in this . Also please help me
in splitting the file... (10 Replies)
Discussion started by: mskalyani9
10 Replies
7. Shell Programming and Scripting
Hi All,
Can someone please help me write a script for the following requirement in awk, grep, sed or perl.
Buuuu xxx bbb
Kmmmm rrr ssss uuuu
Kwwww zzzz ccc
Roooowwww eeee
Bxxxx jjjj dddd
Kuuuu eeeee nnnn
Rpppp cccc vvvv cccc
Rhhhhhhyyyy tttt
Lhhhh rrrrrssssss
Bffff mmmm iiiii
Ktttt... (5 Replies)
Discussion started by: kumarn
5 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have to split a line of the form
1232423#asdf#124324#54534#dcfg#wert#rrftt#4567
into an array in perl. I am using
@fields;
@fields=split('#',$line);
if($fields eq "1")
But this is not working. By using the syntax, the statements in "if" are never executed. Please help.... (9 Replies)
Discussion started by: rochitsharma
9 Replies
9. Shell Programming and Scripting
Hi,
I am trying to use the split commad to seperate string reading from file. but it dosent give me a correct result. can some body tell me what is the wrong in following scritp.
#!/usr/bin/perl -w
#use CGI qw(:standard); ... (2 Replies)
Discussion started by: maheshsri
2 Replies
10. Shell Programming and Scripting
Hi,
I have a problem in grepping a file for 2 strings and writing them to 2 appropriate files. I need to use the awk command and read the file only once and write to the appropriate file.
My file is very huge in size and it is taking a long time using cat command and grep command.
Can anyone... (3 Replies)
Discussion started by: m_subra_mani
3 Replies