Search Results

Search: Posts Made By: princetd001
1,650
Posted By princetd001
do you recommend any other solution other than...
do you recommend any other solution other than find? Why did you say "find" is risky and not efficient?

If I put echo before rm -f what will happen?
1,650
Posted By princetd001
If I use this command, does this remove the files...
If I use this command, does this remove the files in a given directory or it recursively go in each parent-child-grandchild diretory and delete the files and remove the directories those are empty?
...
1,650
Posted By princetd001
but my folder structure is ...
but my folder structure is


2001-2100/01-12/01-30/files


If we remove dates in removal process based on 541 criteria , 1-30 , then automatcally month folder should be removed,

in...
1,650
Posted By princetd001
Removing folders - hierarchical stored
my data files are stored in such way like year[parent folder]->month->day-> data files, my requirement is to find out number of days of files from today to the starting day of storig files.
root...
4,325
Posted By princetd001
I added c=$(( c + 1 )) It throws the...
I added c=$(( c + 1 ))


It throws the following error

ksh[2]: c + 1 : bad number

while IFS= read -r line; do
c=$(( c + 1 ))
if [ ${#line} == 4499 ]; then
echo ${line}
echo...
4,325
Posted By princetd001
i am getting error, i tried with bash and without...
i am getting error, i tried with bash and without as well.


bash-3.00$ awk 'length($0==4499) {print FNR, " has length 4499"}' input.dat
awk: syntax error near line 1
awk: bailing out near...
4,325
Posted By princetd001
Finding row number along with length of row
I have a fixed length file and I want to find out row number along with row length.

I have a program that give me the line length if it satisfy the condition; but i would like to add row number...
4,307
Posted By princetd001
Thanks a lot for your prompt reply and I am new...
Thanks a lot for your prompt reply and I am new to unix and awk

I f I want to check to see if substr($0,869,869) returns how many 1s and how mnay 0s and how many 2s from each file and print the...
4,307
Posted By princetd001
#!/usr/bin/ksh ...
#!/usr/bin/ksh
##################################################################
#
# Remove Control M characters and invalid line break from the specified fil
# usage: removeInvalidChar FileName...
4,307
Posted By princetd001
Will below code work? I have not tried and but I...
Will below code work? I have not tried and but I wrote a draft.


#!/bin/ksh
printf "count\trecord\n" > file_prov_coutry_time.csv
find 2013/02/0[1-9] 2013/02/1[0-9] -name...
4,307
Posted By princetd001
I may not be knowing the file names. my scripts...
I may not be knowing the file names. my scripts should run through each folder recurssively and find files and do the awk command that you provided.

my folder structure will be as follows

it...
4,307
Posted By princetd001
The above code is for only one file, suppose I...
The above code is for only one file, suppose I have more than one folders and i want to search these conditions in each folder and output to a file?

suppose the folder structure is as follows
...
4,307
Posted By princetd001
What I meant the records between the following...
What I meant the records between the following time range

TimeStamp>= 12022013000000and TimeStamp <= 13022013000000
4,307
Posted By princetd001
but i do not see the condition for TimeStamp time...
but i do not see the condition for TimeStamp time stamp <= 12 feb 2013 00:00:00 to 13 feb 2013 00:00:00
4,307
Posted By princetd001
Count on grep for more than two values in a row of fixed length file
I want to get count on number of records in a few folders by running grep command for more than two columns in a row of fixed length file.

suppose if i have a fixed length file has 5 columns and...
16,002
Posted By princetd001
Fixed length file extracting values in columns
How do I extract values in a few columns in a row of a fixed length file?

If there are 8 columns and I need to extract values of 2nd,4th and 6 th columns, how do i do that? I used cut command,...
5,439
Posted By princetd001
In a few folders, the files are saved with file...
In a few folders, the files are saved with file names as given below [ends with .dat] , in this case I do not need to cut off .trnsfr.gz and also I want to extract FILE_IDs from these files along...
5,439
Posted By princetd001
FILE_ID EXTRACTION from FILE_NAME DATE RANGE
in my first question, file_id extraction from file_name, if i need to extract file_ids in a range like January 26 2012 to today? How do I specify it?

---------- Post updated at 04:44 PM ----------...
5,439
Posted By princetd001
1. Do you want only the files with names matching...
1. Do you want only the files with names matching sasmm_fsbc_durds_id000[0-9]*_t?*.dat.trnsfr.gz to be renamed, or do you want every file matching id000[0-9]*_t to be renamed?



2. Do you want...
5,439
Posted By princetd001
I neeed one more solution for replacing a few...
I neeed one more solution for replacing a few characters in a file name. As I mentioned above, my folder structure and files are constructed as given in my previous posts.


folder years ->...
5,439
Posted By princetd001
script #!/usr/bin/env ksh OUTFILE=test.txt ...
script
#!/usr/bin/env ksh
OUTFILE=test.txt
find 20[0-1][0-9] -type f | while read path
do
name=${path##*/}
name=${name%.trns*}
id=${name%_*}
id=${id##*_}
id=${id##*000}
...
5,439
Posted By princetd001
Code: ...
Code:
sasmm_fsbc_durds_id00020532_t20100313192606.dat.trnsfr.gz sasmm_fsbc_durds_id00020513_t20120913003312.dat.trnsfr.gz
and then you say you want the entire filename to be the second field in...
5,439
Posted By princetd001
FILE_ID extraction from file name and save it in CSV file after looping through each folders
FILE_ID extraction from file name and save it in CSV file after looping through each folders

My files are located in UNIX Server, i want to extract file_id and file_name from each file .and save...
4,520
Posted By princetd001
FILE_ID EXTRACTION FROM FILE NAME AND SAVE IT IN CSV FILE AFTER LOOPING THROUGH EACH FOLDERS
My files are located in UNIX Server, i want to extract file_id and file_name from each file .and save it in a CSV file. How do I do that?
I have folders in unix environment, directory structure is...
4,520
Posted By princetd001
0403-057 Syntax error
I am getting the error :

rocfm/wls_subload/in/processed_files/tel_input_additional_checked_all_mandatory.txt: 0403-057 Syntax error at
line 1 : `|' is not expected.
>>>>ALL MANDATORY FIELDS...
Showing results 1 to 25 of 25

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