Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: tkbharani
5,048
Posted By tkbharani
remove "\0" charecters
Hi
We have a sed command line to remove \0 characters from specific file. This command redirects the output to a new different file. Is there a way to open the same file, remove special...
10,288
Posted By tkbharani
Jim what you said is correct. If I dont want to...
Jim what you said is correct. If I dont want to specify full path for mktemp, is there any way to make it by default. Like how to make the script to recognize mktemp from /usr/bin.
10,288
Posted By tkbharani
My script is not containing mktemp... my...
My script is not containing mktemp...

my common libraries are using.
This script was running previously without error. What should I check for to avoid this error.Do I need to check any...
10,288
Posted By tkbharani
mktemp error
When I execute a korn shell script , I am getting the following error.

"mktemp not found"

Why I am getting this...is this error related to script.
6,906
Posted By tkbharani
Hai I got the solution. But there is...
Hai

I got the solution. But there is small problem

nawk -v rd=`date +%Y"-"%m"-"%d" "%T` ' BEGIN{FS=OFS=","}
{
n=split($3,a1,"~")
split($4,a2,"~")
split($5,a3,"~")
for(i=1;i<=n;i++) {...
6,906
Posted By tkbharani
Dear era Here is the code awk...
Dear era

Here is the code

awk -v rd=`date` ' BEGIN{FS=OFS=","}
{
n=split($3,a1,"~")
split($4,a2,"~")
split($5,a3,"~")
for(i=1;i<=n;i++) {
print $1,$2,a1[i],a2[i],a3[i]
}
}'...
6,906
Posted By tkbharani
awk -v RD=$(date +%Y%m%d) 'BEGIN{FS=OFS="|"} { ...
awk -v RD=$(date +%Y%m%d) 'BEGIN{FS=OFS="|"}
{
n=split($7,B_ID,"~") split($8,B_VAL,"~") split($9,B_COS,"~")
for(i=1;i<=n;i++)
{
print...
6,906
Posted By tkbharani
calling external values inside awk command
I have a code as follows

awk ' BEGIN{FS=OFS=","}
{
n=split($3,a1,"~")
split($4,a2,"~")
split($5,a3,"~")
for(i=1;i<=n;i++) {
print $1,$2,a1[i],a2[i],a3[i],date
}
}' file

...
2,038
Posted By tkbharani
RD=`date +%Y"-"%m"-"%d" "%T` awk '...
RD=`date +%Y"-"%m"-"%d" "%T`
awk ' BEGIN{FS=OFS=","}
{
n=split($3,a1,"~")
split($4,a2,"~")
split($5,a3,"~")
for(i=1;i<=n;i++) {
print $1,$2,a1[i],a2[i],a3[i],$RD
}
}' file
...
2,038
Posted By tkbharani
thanks Buddy..that works I know FS which is...
thanks Buddy..that works
I know FS which is file seperator.
1. Can you explain me the key words like OFS.
2. how does this works for each line in a file..there are no loops for going to next line.
2,038
Posted By tkbharani
removing frame charecters
Hi
I have a requirement as follows. My Input file is as follows.

COL1,COL2,COL3,COL4,COL5
987,2,3~7~5,400~468~598,0005~4687~5980
1111,2,2~7,400~468,0005~897

Expected OUTPUT
============...
4,629
Posted By tkbharani
cat command
Dear All

I have two text files File1.txt and File2.txt . I am concatenating the two files and making it as single file Cat_File.txt. Now i need to keep joined file in two different path....
11,909
Posted By tkbharani
thank u.The script is working
thank u.The script is working
11,909
Posted By tkbharani
delete records using line number(NR)
Hai

I have a flat file which contains more than 6 crore lines or records. I want to delete only one line, using line number. For example I want to delete 414556 th line . How to do this...
7,454
Posted By tkbharani
Exactly I dont know what it does internally...So...
Exactly I dont know what it does internally...So can you give me how to do this using grep or fgrep...
the pattern_file contains patterns in each line,terminated by <enter>.
7,454
Posted By tkbharani
grep using -f option
Dear all

I have a file with more than one patters to search.Such as pattern.txt. I have to grep these patterns into a data file such as data.txt.how to do this ,i tried
...
1,160
Posted By tkbharani
ftp help
Dear All
I am using ftp <IP> to get some files from another server. after logging in using ftp,I have to check the following ...
1. Check if file's exist
2.If exist how many...
9,048
Posted By tkbharani
Help regarding crontab
Dear All
jobs are scheduled in crontab . To view this I use crontab -l . But suddenly today I am not able to see any jobs that is being scheduled in crontab. when I type crontab -l , I am...
4,178
Posted By tkbharani
command terminated abnormally
I am getting an Error Message as

=============================
starting Sortcl Merging And Aggregation
time: command terminated abnormally.
=============================

, when running a...
4,787
Posted By tkbharani
ok yar....
ok..ok...its just some Curiosity yar. Now pls can u give me some mustard, mayonese,
french fries and milkshake. I am in need of it...yar
4,787
Posted By tkbharani
If my data contains address...
Incase if my data contains a address field as follows..

0|6799834|3/4,FirstMain road,Mumbai/Maharashtra|789898|0/787


then how i will remove the last /787 only.In case of
sed 's:/.*::'...
4,787
Posted By tkbharani
can u explain..
Can u just explain why u r using .*::.
or just tel whether it is replacing all the charecters after / or it is deleting .
4,787
Posted By tkbharani
How to delete dynamic pattern
Dear Alll

I have 16 columns,in my data file.In my 16th column i m getting unwanted data like /186.how to remove it.The value in 16th column is dynamic.

Data:
-----...
11,642
Posted By tkbharani
`echo userid=$userrep/$UDD_CMT_LVLPS2@$dsnrep...
`echo userid=$userrep/$UDD_CMT_LVLPS2@$dsnrep control=$ctlfile data=$datafile log=$logfile bad=$badfile $ldrval $ldrparams > $pthtest/passwd.par`



The variable $UDD_CMT_LVLPS2 is not defined...
2,239
Posted By tkbharani
Find a environment variable Value !
There is shell script which contains some variables .
These variables are used , but they have not declared in the script.
I think its a environment variable, so I want to know where these...
Showing results 1 to 25 of 42

 

Featured Tech Videos

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