Search Results

Search: Posts Made By: shruthidwh
1,024
Posted By shruthidwh
timestamp=`date '+%Y%m%d%H%M%S'` ...
timestamp=`date '+%Y%m%d%H%M%S'`
FILE=/root/cdr/src.var.csv
1,024
Posted By shruthidwh
Thanks for the quick reply. I tried the...
Thanks for the quick reply.

I tried the first command I am getting the '<' unexpected. And the second command is giving bad substitution error,
1,024
Posted By shruthidwh
awk string removal
Hi,

I am trying to remove a string ".var" using the below command but it's not working as expected, when I execute this in the command prompt using the echo it's working fine , please let me know...
2,321
Posted By shruthidwh
Hey, Let me know if you can use batch scripting...
Hey,
Let me know if you can use batch scripting I have a script with me which exactly suits your requirement some how this kind of dynamic scripting is tough to implement in unix.
Regards,
Shruthi
1,172
Posted By shruthidwh
Hi, I am generating some delete and insert...
Hi,

I am generating some delete and insert sqls dynamically and I am redirecting them to a file in \execute\sqls\ through print -u3, now instead of redirecting to a file can i print the insert's...
1,172
Posted By shruthidwh
How to print based on the value from counters?
Hi,

I am writing a script which will get the input from a combinations of awk commands and using counters and loop I am generating a dynamic values and passing the output to a file using print -u3...
4,179
Posted By shruthidwh
Hi , I am using the below script for...
Hi ,

I am using the below script for generating my report...it is generating duplicate entries , and I am not able to capture owner and user info...pls tell what is wrong in the script.
...
4,179
Posted By shruthidwh
Folders and Files Inventory
Hi ,

We are migrating our scripts from one unix server to another unix server in aix. Is there any way we can export the permissions, owner, group of the folders and files inside the folders.
...
5,433
Posted By shruthidwh
is there any easy way to do this.. I have more...
is there any easy way to do this.. I have more than 200 files I don't want to write cat statement for all these files to append the data in to one big file.
5,433
Posted By shruthidwh
Sort and join all .csv files
Hi ,

I have a dump of .csv files in a folder, I need to sort all files by the first 3 columns and merge them all in one big csv file.

I am using a cat command to join them, but how can i sort...
2,543
Posted By shruthidwh
Conditional execution of statements
Hi ,

I have a script which has multiple awk and sed commands like below.


First one :-
find /root/src/ -name "*csv" -size 0 -exec rm {} \;

Second one: -
ls *SRE*.txt > SRT_TRAN.dat
...
912
Posted By shruthidwh
awk help
Hi ,

My source data is as below.

1,2,3,4,5
1,,,,,
1,2,3,,
2,,,,,


My target should be

1,2,3,4,5
1,2,3,,


I am using the below awk code.

awk '$2!="" && $3!="" print$0' infile
12,871
Posted By shruthidwh
awk for removing special characters and extra commas
Hi,

I have a .csv file which as empty lines with comma and some special characters in 3rd column as below.

Source data
1,2,3,4,%#,6
,,,,,,
1,2,3,4,5,6
Target Data
1,2,3,4,5,6I need to...
883
Posted By shruthidwh
Thanks for the replies, the script is some how...
Thanks for the replies, the script is some how not working as expected in our environment. is there any other way I can check if file exists if yes the it's size should be greater than 0 bytes. Based...
883
Posted By shruthidwh
Script Help
Hi ,

I am using the below script to check if a file is present if yes I will my next step if no this should return status as 1

if [[ -s $1 ]]
then
echo "File $1 FOUND!"
exit 0
fi
echo...
2,532
Posted By shruthidwh
HI , I tried the below code but it's giving...
HI ,

I tried the below code but it's giving the error at the datetime part.

awk 'BEGIN { print "file_name = test_count" } print { Datetime = "date +%Y%m%d%H%M%S"} print {date = "date"} print...
2,532
Posted By shruthidwh
Hardcoding & Record counts in a file
HI ,

I am having a huge comma delimiter file, I have to append the following four lines before the starting of the file through a shell script.

FILE NAME = TEST_LOAD
DATETIME = CURRENT DATE...
37,822
Posted By shruthidwh
Add header to a .csv file
Hi,

I am trying to add a header record to all the .csv files in a directory.

I am using the below sed commnad

sed -i '1 i \abc,sam,xyz,tip,pep,rip' xyz.csv

but this is not adding the...
1,326
Posted By shruthidwh
Hi yazu, Below is my source data ...
Hi yazu,

Below is my source data

AIRTEL,POSTPAID,98850,9885714478,9885814478,9665871143
AIRTEL,PREPAID,97415,9885714478,9885814478,9665871143...
1,326
Posted By shruthidwh
Hi Yazu, I am trying to apply a sed logic...
Hi Yazu,

I am trying to apply a sed logic using the below code only if my first column has ABC and second column as XYZ,but the below code is not giving the required output.

sed -r -n '/^[...
1,326
Posted By shruthidwh
sed basic doubt
Hi ,

what is the equivalent of below awk in sed.

awk '$1=="ABC"&&$2=="XYZ" {print $0}' infile

Thanks,
Shruthi
1,592
Posted By shruthidwh
Appending timestamp problem
Hi,

I am trying to insert a timestamp after all the file names in a folder,after the timestamp is created in the filename the file size is becoming zero bytes.

please tell me where I am doing...
4,407
Posted By shruthidwh
file name with timestamp validation
Hi ,

I am trying to write a shell script which will validate all .csv file names in a directory , my file name format is as below.

CDR_SCAN_Report_YYYYMMDDHHMI.csv

1. I need to validate the...
1,421
Posted By shruthidwh
Adding number before file extension
Hi ,

I have a file which has a line starts with $segment_name and has the below data

source data

$Segment_Name = 123.ABC.123.01.txt
$Segment_Name = 123.ABC.ABC.txt
$Segment_Name =...
3,860
Posted By shruthidwh
Instring in awk
Hi,
I have the below data

ownername/schemaname/tablename/columnname in a file ( 2nd column)

I want to convert everthing to upper case except the column name like below
...
Showing results 1 to 25 of 43

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