10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team
below test file contains tab delimeter file and i am excepting the number of files 3.
File : test.txt
a b c
awk -vFPAT='\t' -vOFS="\t" -v a="0" -v b="10" ' NR>a {if (NF != b ) print NR"@"NF }' test.txt
current output is
1@2
required output is
1@3
Cloud you please help... (7 Replies)
Discussion started by: bmk123
7 Replies
2. Shell Programming and Scripting
Hello All;
I have an input file 'abc.txt' with below text:
512345977,213458,100021
512345978,213454,100031
512345979,213452,100051
512345980,213455,100061
512345981,213456,100071
512345982,213456,100091
512345983,213457,100041
512345984,213451,100011
I need to paste the first field... (10 Replies)
Discussion started by: mystition
10 Replies
3. Shell Programming and Scripting
I've a pipe delimited data in a file of size 3GB. if the text data conatins pipe delimiter that will be enclose with double quotes. I have to replace delimiter which exists between double quotes with #%@#%@#%@ using awk or sed. can some one provide a better and efficient solution to me.
The below... (4 Replies)
Discussion started by: BrahmaNaiduA
4 Replies
4. Shell Programming and Scripting
Hello life savers!!
Is there any way to use substr in awk command for returning one part of a string from declared start and stop point?
I mean I know we have this:
substr(string, start, length)
Do we have anything like possible to use in awk ? :
substr(string, start, stop)
... (9 Replies)
Discussion started by: @man
9 Replies
5. Shell Programming and Scripting
Hi to all,
I'm here again, cause I need your help to solve another issue for me.
I have some files that have this name format: date_filename.csv
In my shell I must rename each file removing the date so that the file name is filename.csv
To do this I use this command:
fnames=`ls ${fname}|... (2 Replies)
Discussion started by: leobdj
2 Replies
6. Shell Programming and Scripting
HI I am using awk and substr function to list out the directory names in the present working directory .
I am using below code
ls -l | awk '{ if ((substr($1,1,1)) -eq d) {print $9 }}'
But the problem is i am getting all the files and directories listed where as the requirement i wrote... (7 Replies)
Discussion started by: prabhu_kumar
7 Replies
7. Shell Programming and Scripting
I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Discussion started by: Akumar1
5 Replies
8. Shell Programming and Scripting
HI,
Need awk command to get date and time alone from
Input : "15:29:15 28.08.2010|SCHEDULE: Started program POSG1"
Output expected : "15:29:15 28.08.2010"
Please help. (9 Replies)
Discussion started by: shanneykar
9 Replies
9. Shell Programming and Scripting
Hi
I have multiple files that name begins bidb_yyyymm. (yyyymm = current year month of file creation).
What I want to do is look at the files and where yyyymm is older than 1 month I want to remove the file from the server.
I was looking at looping through the files and getting the yyyymm... (2 Replies)
Discussion started by: colesga
2 Replies
10. Shell Programming and Scripting
Hi all,
I have a flatfile
I would like to get ext = 7950 , how do I do that ?
if ($1 == "CTI-ProgramStart") {
ext = substr($9,index($9,"Extension")+11,4);
But why it is not working ???? Please help .
Thanks (1 Reply)
Discussion started by: sabercats
1 Replies