Search Results

Search: Posts Made By: gaur.deepti
1,393
Posted By gaur.deepti
Thanks Ravinder, can you please help me know how...
Thanks Ravinder, can you please help me know how can I automate this to check for all the files in a particular folder.

find /src/var/ -name '*.txt' | while read file
VALUE=`awk '/Error/ || /Not...
1,393
Posted By gaur.deepti
Validation before moving the File
Hi,

Before moving the files from source directory to target directory I need to check if the files have these strings 'Error', 'Not Valid' ,' YTF-' or if the file is a zero byte file, if the file...
866
Posted By gaur.deepti
Storing the Column as Variable and Replacing
Hi All,

Please suggest how can I achieve the below.

I have a file as below.

CDRSCAN|124434|Loaded|S
Success|abc|xyz|123|xyz|abc|xyz|123|xyz|abc|xyz|123|xyz...
1,457
Posted By gaur.deepti
Hi, I have gone through the link and applied...
Hi,

I have gone through the link and applied in my sed command but the argument is not working.

I am trying to modify an existing shell script which is doing etl validations.
below is the sed...
1,457
Posted By gaur.deepti
Parametrization Help
Hi,

Need help in Parametrize the file name and passing the file name as a prompt to the script.

Currently I am using a filename inside my script has below

export...
3,923
Posted By gaur.deepti
LPAD in UNIX
Hi,

Can we do Lpad in unix using awk or sed, I have a pipe delimiter file in which 4th column should have length of 17 characters, but in the source files the value for these are not consistent...
4,179
Posted By gaur.deepti
you can try something like below in awk or sed ...
you can try something like below in awk or sed

This is not the correct syntax..just for giving you an idea.

ls -lstr | awk 'print $2,$3...(which all feilds you want) > file.csv comma separated...
1,976
Posted By gaur.deepti
Thanks a lot ., the script is working can you pls...
Thanks a lot ., the script is working can you pls tell me why you are using exit 100
1,976
Posted By gaur.deepti
Hey , I have verified the script and used echo...
Hey , I have verified the script and used echo for this command every thing is okay, all the mv commands are fine they are not using -T option anywhere., I am not sure why this warning is coming.
1,976
Posted By gaur.deepti
Hi, The files are created in windows...
Hi,

The files are created in windows environment, I have a routine which will replace spaces with "_" characters.., I have changed the code as below it is working but still the warning message...
1,976
Posted By gaur.deepti
I am getting the below error...,i tried putting...
I am getting the below error...,i tried putting the -f option after move but still same issue ,pls tell me where i am doing wrong

mv: illegal option -- T
Usage: mv [-i | -f]...
1,976
Posted By gaur.deepti
Hi , Thanks for your quick response. I have...
Hi , Thanks for your quick response.

I have modified the code for checking all the .csv files for proper file format.

find /edw/data/ -name '*.csv' | while read FILENAME
do
awk -F, '{if(NF...
1,976
Posted By gaur.deepti
awk help
HI ,

I am trying to validate the source files, before loading them. The validation I am doing is checking the no of columns in the file should be proper, all the source files should have 8...
1,936
Posted By gaur.deepti
Scripting for Inventory
Hi,

I am getting all the scripts in my unix box through ls and pasting them in a xls for the Inventory Purpose.

Right now I am doing it manually I am going manually in each directory and doing...
777
Posted By gaur.deepti
awk script help
Hi ,

I am trying to split my source files into different files based on my first column.

source data

abc.txt,1,2,3,4
abc.txt,3,4,5,6
xyz.txt,3,4,5,6
123.txt,2,3,4,5
123.txt,4,5,6,7
...
983
Posted By gaur.deepti
Conditional removing of words from a line
Hi ,

I have a .csv file,from which I want to remove some data from each column as below.


Source Data
...
35,412
Posted By gaur.deepti
HI , I tried the below code it's working . ...
HI ,

I tried the below code it's working .

awk 'BEGIN { FS=","; OFS="," } {$5=$6="";gsub(",+",",",$0)}1'

can you please tell me what we are doing in the below part of the code.
...
35,412
Posted By gaur.deepti
Removing columns using awk
HI ,

I want to remove 5th and 6th column from a .csv file using awk.is there any way of this apart from writing the each field as below


awk -F, '{print $1,$2,$3,$7......$100}' OFS=, infile....
2,232
Posted By gaur.deepti
hey you can use awk '/./' infile for...
hey you can use

awk '/./' infile for removing blank lines
2,522
Posted By gaur.deepti
awk for validating
HI,

I am trying to write a validation script as below

awk '($1=="ABC"&&$2="XYZ" ,then check the value in $8,$10 these columns should not be null.

so their should be some corresponding value...
1,587
Posted By gaur.deepti
Adding the data before file extension
HI ,

I have a file with multiple lines like below, I need to check on column starting with #prototype if it has the .Number.txt extension do nothing else add 1.txt extension.

Source data...
1,024
Posted By gaur.deepti
Thanks Kevintse, it working can you please tell...
Thanks Kevintse, it working can you please tell me why we are using 1' after the record word, i executed it with out the 1 the script is returning nothing .., what exactly 1 will do here and do we...
1,024
Posted By gaur.deepti
Thanks kevintse. ---------- Post updated at...
Thanks kevintse.

---------- Post updated at 11:26 PM ---------- Previous update was at 07:34 PM ----------

hey The code is removing the delimters and getting the entire line value in the first...
1,419
Posted By gaur.deepti
awk basics
Hi,

Please tell me where can I get started with awk..like the basics and the whole awk stuff.


Regards,
Deepti
1,024
Posted By gaur.deepti
Help with awk command
Hi ,

I am writing a awk script which will check the values in field 1 and field 2 based on these values the awk has to update field 4.

Source data
ABC,XYZ,1,2,3,XXXXXXXXXXXXXX,1,2,3...
Showing results 1 to 25 of 42

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