Search Results

Search: Posts Made By: akashtcs
2,014
Posted By akashtcs
The file is a tab delimited not pipe...
The file is a tab delimited not pipe delimeted.The fields will be present in the fixed positon.It will not be present anywhere else.So we can search the full line itself with the 3 patterns or the...
2,014
Posted By akashtcs
Filter file according to pattern
Hello

I have an input file which is tab delimited.In my unix script I have search for a particular pattern.If it is NOT present then I have to write in an output file.
Eg.Input file is :

123 ...
1,810
Posted By akashtcs
hi part1 and part2 I am reteiving from the...
hi
part1 and part2 I am reteiving from the file:

part1=`echo $record | cut -c 1-92`
part2=`echo $record | cut -c -103-`

where $record is line of the file.

Thanks
1,810
Posted By akashtcs
Rewriting line with tabs creating problem
Hi

I have an input file which have random file in between.I have to manipulate each line and replace the character from position 5-10 with XXXXXX.
But when I am writing this to on output file the...
16,306
Posted By akashtcs
I cannot download anything as it is a server and...
I cannot download anything as it is a server and I dont have the permission.
Also I have to use a batch file only to do this task and not anything else.

---------- Post updated at 04:37 AM...
16,306
Posted By akashtcs
No dont have perl in the system, Also cant do...
No dont have perl in the system,
Also cant do it by transferring the file to unix and doing it...:)
There must be something simple in windows to read file line by line and replace a character.
16,306
Posted By akashtcs
I have to use a windows batch file to execute...
I have to use a windows batch file to execute this.
This command is used in Unix I guess..
Thanks
16,306
Posted By akashtcs
Batch file to remove double quotes from a file
Hi

I have to create a windows batch file which will read an input file and remove "double quotes" from each line of the file.
For eg.If input file name is abcd.csv and contents is :

...
18,971
Posted By akashtcs
Subtract -1 from a date in Unix script
Hi

I have a date in a variable in Unix script and have to subtract -1 from the date.



fromdate='07/13/2009'



Now we want to subract one day from it i.e the end result should be...
8,116
Posted By akashtcs
How to implement it if we have to search patten...
How to implement it if we have to search patten with a space in between?
If we have to search for "rama raja" in the line "rama raja roha".
This is not working.
8,116
Posted By akashtcs
ok thanks... But this will return the whole...
ok thanks...
But this will return the whole line.How do we implement in a if condition?

if [ pattern is matching in the variable ]
then
do something
fi
8,116
Posted By akashtcs
Grep will search the full file.I want to search...
Grep will search the full file.I want to search only 1 line.

Can grep be used without giving the file name and just giving the variable which has a line stored in it?
i searched but could not...
8,116
Posted By akashtcs
Find a pattern in a single line
Hi

I have to find if a pattern is present in a line.
eq


line="dasdasd hello asdasdasd"



Have to find if "hello" is present in the line or not.
Which command to be used?

Thanks
13,865
Posted By akashtcs
Put some echo statements.: ...
Put some echo statements.:

Interchange_value=`cat $CHASEFILE |head -$line_counter | tail -1 |cut -f13`
echo "Interchange_value is"
echo $Interchange_value
Assesments_value=`cat $CHASEFILE |head...
13,865
Posted By akashtcs
If I make a sample script and use it.It works...
If I make a sample script and use it.It works perfectly fine.
But does not work in my script.

The only difference is that I am getting these variables from a file.:


Interchange_value=`cat...
13,865
Posted By akashtcs
Hi Following is my code: ...
Hi
Following is my code:


#!/usr/bin/ksh

#Combined_amount=`echo $(expr $Interchange_value) + $(expr $Assesments_value) + $(expr $Transfees_value) + $(expr $TE_value) | bc`
...
13,865
Posted By akashtcs
Tried implementing it but got the same error. ...
Tried implementing it but got the same error.

The value "23.45" will be in a variable


a=2
b="23.45"
c=45.56

total=`echo $a + $(expr b) + $c | bc`

Also tried:
total=`echo $a + $(expr...
13,865
Posted By akashtcs
Thanks a lot....:) total=`echo $numone +...
Thanks a lot....:)

total=`echo $numone + $numtwo | bc`

worked fine.

There is also one more prob......The variable sometimes contains "" attached to it also eg "23.45".
How to handle this...
13,865
Posted By akashtcs
Adding variables in a unix script
Hi
I am trying to add variables(float values) in a unix script but am getting an error



value=`expr $a + $b + $c`



The error I am getting is "expr: non-numeric argument"
I guess it...
10,216
Posted By akashtcs
Hi I tried with a test file.It worked...
Hi

I tried with a test file.It worked perfectly fine.
But for the file that I have to process,it is not working.
This file has been created from an excel file by converting the excel to a...
10,216
Posted By akashtcs
Retrieving values from tab-delimited file in unix script
Hi

I am trying to retrieve values from a tab-delimited file.I am using



while read record

value=`echo $record | cut -f12`

done


Where 12 is the column no i want retieve and record...
18,520
Posted By akashtcs
But if I am not wrong we can use perl commands in...
But if I am not wrong we can use perl commands in unix scripts also?
So what perl commands can be used to read the excel and write the same contents to a csv file.
18,520
Posted By akashtcs
How to convert a excel file to a .csv file from unix script
Hi
I have a excel file in unix machine and have to convert it into a .csv file.I have to do this from a unix script.How do we do this?

Thanks
Abhinav
4,029
Posted By akashtcs
How to remove Ctlr-M characters from file from a unix script
There are 10 files present which have Ctlr-M characters appended to each line of all files.

I have a unix script which processes the files in a loop.
And there is an inner loop which processes...
Showing results 1 to 24 of 24

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