Search Results

Search: Posts Made By: looty
12,871
Posted By looty
Convert floating to integer in ksh
I am having a floating variable which may or may not be float, but the output must be in interger only.

Suppose the variable "a" has float value, then it should be convert to nearest interger...
12,850
Posted By looty
tried, but empty space instead of data
I tried the below command, but got empt space as a result

awk 'BEGIN{ FS=OFS="|" }; NR==FNR {T[$1]=$2; next} $7 ~ /^sign {$7=T[$1]} 1' OFS="|" file1.csv file2.csv> final.csvwrong result please...
9,384
Posted By looty
CSV file opens with data in a single column
CSV file opens with data in a single column. Please help me to resolve this issue.

I have a file in the name of test1.csv with the content as below
xxxx|0001|rose
yyyy|8768|lotus...
12,850
Posted By looty
Question
I have tried for "I" separated file with below command got error as below... could u please help on this?

awk -F| 'NR==FNR {T[$1]=$2; next} $7 ~ /^Sync/ {$7=T[$1]} 1' OFS=| file2.csv file1.csvawk:...
12,850
Posted By looty
Thanks a lot.!!!
Hi Rudic,
I just tried it in a sample file... Its working....


Thanks a lot :)

Could you please explain the command, it will help me to understand?
12,850
Posted By looty
Compare two files, if the columns are same then replace next column with some value
Hi Team,

As i'm new to the shell scripting, i stuck in a place to replace a column valuein a file when compared with other file. Could you please help me to work on this?
I have 2 files test1.csv...
9,725
Posted By looty
Thanks for the answer :-) I tried the...
Thanks for the answer :-)



I tried the below code and got error.
CODE :

a=sss2345
set -x
if [[ ( $a =~ sss[0-9]*$ ) ]]; then
echo "4th position is num"
else
echo "4th position is not...
12,125
Posted By looty
Find string from file,search in table based on the string,then replace string with result in newfile
Could anyone please help me to get solution for my below requirement. As i'm beginner to shell scripting, i don't have complete idea to achieve solution for below requirement. i tried "cut" and awk...
9,725
Posted By looty
How to find the string which is starting with some letters and having numbers from 4th position?
How to find the string which is starting with ROS and having numbers from 4th position
For example: I have strings as below
string1 :ROSE543
string2 :ROS543
string3 :ROS54SQD
string4 :ROSEFLOWER...
Showing results 1 to 9 of 9

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