Search Results

Search: Posts Made By: Prashanth B
1,123
Posted By Prashanth B
Extract values
hi

I have a line as given below. I need to match "COLUMN_NAME" and get the every third value ie words in between quotes completely (' ')


Sample Input -
COLUMN_NAME Like '%value%' Or...
3,452
Posted By Prashanth B
It gives the below error date: illegal...
It gives the below error

date: illegal option -- -
Usage: date [-u] [+Field Descriptors]
date.sh[14]: test: argument expected


My env is pure ksh, I doubt that about bash executing here.
3,452
Posted By Prashanth B
Yes, I need to generate a list of year-month...
Yes, I need to generate a list of year-month pairs between two dates.
3,452
Posted By Prashanth B
Extracting Dates
I need to generate a file which should have range of year and month in the below mentioned format:


200901
200902
.
.
.
till
201311


This jobs runs on-demand. Even if this is ran...
1,913
Posted By Prashanth B
Thanks krishmaths and that was working as...
Thanks krishmaths and that was working as expected...!
Learned how to declare variable in "awk".
1,913
Posted By Prashanth B
Thanks..thats working..! But when I tried...
Thanks..thats working..!

But when I tried passing runtime value for column count its not working

awk -F"," '{if(NF<$ColumnCnt) {print "Line number : "NR" has less number of columns which is...
1,913
Posted By Prashanth B
How to find line number?
I have a data file (which has five columns) from which im finding column count of all the records and writing into separate file say "colcnt.txt". And I find one (or more) records have less column...
1,151
Posted By Prashanth B
Finding delimiter
Hi,
I need to find the field separator for the given files.


Ex-
abc.txt is "|" delimited file , when I give command the output should be "|" and that shud store it in another variable.

...
1,337
Posted By Prashanth B
Sorry, its a sensitive dat. A '$' symbol is...
Sorry, its a sensitive dat. A '$' symbol is getting appended at the end of each line.
1,337
Posted By Prashanth B
It is working with .txt files but not with .csv...
It is working with .txt files but not with .csv files
1,337
Posted By Prashanth B
Last line omit
I have a csv file "file.csv" which has 5 records but when I check record count for file.csv in unix it shows as 6, the last line is empty and I need to omit and need for processing.
Kindly help.
...
1,748
Posted By Prashanth B
ls -e not working Im using AIX.
ls -e not working

Im using AIX.
1,748
Posted By Prashanth B
Desired Date format
I need to get the current year for the files that has been created today.
Ex-

when i list in unix console it shows

ls -l abc.txt
-rw-rw-r-- 1 user1 user1 33 May 2 08:58 abc.txt
...
3,811
Posted By Prashanth B
Yeah Its working I thought of getting it in...
Yeah Its working I thought of getting it in single command rather than executing it 5 times.


for i in {1..5}
do
cp details.csv details{$i}.csv
done

this is not creating 5 different files...
3,811
Posted By Prashanth B
I need to create a copy of details.csv with...
I need to create a copy of details.csv with different names (details1.csv,details2.csv,details3.csv,details4.csv,details5.csv) along with the data. The data must be same in all the files but only the...
3,811
Posted By Prashanth B
Create Multiple files with content
I have a file details.csv and I need to create 5 files in same folder named as details1.csv,details2.csv,details3.csv,details4.csv,details5.csv along with contents of details.csv

Thanks in...
3,101
Posted By Prashanth B
sorry I just gone out of mind :confused: that...
sorry I just gone out of mind :confused:
that was a different topic and I posted it wrongly, thanks for your concern and you have helped me in framing out the code. :):b:

just one more help...
3,101
Posted By Prashanth B
I have 2 data files and 2 crtl files. Say- ...
I have 2 data files and 2 crtl files.
Say-
A.txt B.txt
C.crtl D.crtl
crtl file has filename|processdate|recordcount
the data in crtl files must be compared with all the txt files
and it...
5,780
Posted By Prashanth B
If I pass 3 three arguments( run time) , it...
If I pass 3 three arguments( run time) , it should take $1 and $2 and compare and should print the result as per below code
and in next run it should take $1 and $3 and do the same process and...
5,780
Posted By Prashanth B
Passing multiple run time arguments
the scenario is -
If I pass 3 three arguments( run time) , it should list all .txt files from a path to temp file
if I pass 2 arguments ( run time) , it should list all .csv files from the same...
1,775
Posted By Prashanth B
while I pass 3 arguments /path crtl1 crtl2 ...
while I pass 3 arguments

/path crtl1 crtl2

to a shell script will the console takes 2 crtl files in order ? Dont we need to specify to terminal that it should process 2 process or it takes...
1,775
Posted By Prashanth B
I think you took it in other way, I wont check...
I think you took it in other way, I wont check for the presence of crtl files in the path that I am passing as an argument.
I match the contents of crtl files (filename|date|count) with that of...
1,775
Posted By Prashanth B
To the below i pass "path" and "crtlfilename"...
To the below i pass "path" and "crtlfilename" this code works for one crtl file what if the path contains 2 crtl files?? what changes needs to be done ??
first time it shud take path and crtl1 file...
1,775
Posted By Prashanth B
Multiple runtime arguments
I am passing 3 runtime arguments to a shell script

$path crtl1 crtl2


the crtl files contains data(filename|date|count)


filename.txt|02/05/2010|10


The path contains the original...
3,101
Posted By Prashanth B
I have tried all possible but the console doesnt...
I have tried all possible but the console doesnt goes into the while loop itself only if it goes it will check for file existence and it prints relevant message.
I m not sure whether I have missed...
Showing results 1 to 25 of 32

 
All times are GMT -4. The time now is 08:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy