Search Results

Search: Posts Made By: ashwin3086
2,609
Posted By ashwin3086
Thanks for the input Rudy. It did point in the...
Thanks for the input Rudy.
It did point in the right direction. Not sure why the ?Yes:No didnt work. I changed the code to use if else loop and it worked.


awk -F"|" '{ if ($2 ~ /[^0-9a-zA-Z,....
2,609
Posted By ashwin3086
Find records with specific characters in 2 nd field
Hi ,
I have a requirement to read a file ( 5 fields , ~ delimited) and find the records which contain anything other than Alphabets, Numbers , comma ,space and dot . ie a-z and A-Z and 0-9 and . and...
8,765
Posted By ashwin3086
Thanks balajesuri. It works perfectly. I did...
Thanks balajesuri.

It works perfectly. I did go through the usage of POSIX/ strftime to understand why you have used -1 for $y[1] (Month) and was able to get the answer.

Thanks again for your...
8,765
Posted By ashwin3086
Hi, Below is the information. Let me know if...
Hi,

Below is the information. Let me know if you need more info.

Shell is Bash.


$uname -a
SunOS sjcapp54 5.10 Generic_150400-11 sun4v sparc sun4v

$uname -r
5.10

$uname -m
sun4v
8,765
Posted By ashwin3086
Hi, It doesnt seem to recognize -d option....
Hi,

It doesnt seem to recognize -d option. Below is the output.
Please Let me know what information you are looking for. I'll add that if that helps.
It is a SOLARIS OS with bash running on...
8,765
Posted By ashwin3086
Pass date (YYYY-MM-DD) as parameter and get Day
Hi,

I have a requirement where I have to pass Date to a script and get the day from it.

Ex If parameter is 2015-09-29
The output should be Tuesday.

Can you please tell me how to get that?
4,528
Posted By ashwin3086
Find number of digits in a word
HI,

Can you tell me how to find the number of digits in a word.


$cat data.txt
+123456ad
87645768



Output should be
6
8
52,305
Posted By ashwin3086
I would like to store each record in the array...
I would like to store each record in the array word by word. Ideally I want to loop through the file and store each word of the record in array and manipulate and print it again in record by record...
52,305
Posted By ashwin3086
Read line by line and store a word in array
Hi,

I would like to read a file line by line and then store the whole line word by word in array so that I can do specific manipulation on each word.




$ cat test.txt
hello how are...
1,898
Posted By ashwin3086
Thanks for the response. I can use translate...
Thanks for the response.

I can use translate but just want to know is there any better way to remove numbers alone along with email ids.
1,898
Posted By ashwin3086
Masking email ids / phone no's in file along with obscene words
Hi,

I would like to know if there is a way to mask obscene words and other contents like email id's/phone numbers in the file. Below is the sample input /output.

Sample data :

cat smp.txt
...
2,141
Posted By ashwin3086
Hi, Thanks for the response. Can you...
Hi,

Thanks for the response.
Can you please explain as to how it works.
I couldnt understand completely.

---------- Post updated at 06:46 AM ---------- Previous update was at 06:44 AM...
2,141
Posted By ashwin3086
The total number of fields is 4. If the record...
The total number of fields is 4.
If the record has lesser number of fields then its a error record.
The exception is "a comma can be a value in the field which is acceptable. In this case the field...
2,141
Posted By ashwin3086
Its basically the new line character.
Its basically the new line character.
2,141
Posted By ashwin3086
finding the incorrect record
Hi ,

I have a scenario where i have to find the incorrect records in the file.
In our comma delimited file , we have the following to be taken care :


1) if there is new line character...
1,108
Posted By ashwin3086
hi, I am not able to use -w option for grep...
hi,

I am not able to use -w option for grep in find command. It is throwing an error.
I am able to use it seperately in grep though.


find . -type f -exec /usr/xpg4/bin/grep -wilE...
1,108
Posted By ashwin3086
help with find command
Hi ,

I want to list all the files from a directory (also in the sub directories) which contain a particular word.
If I am looking for a word ashwin_xyz , i don want files to be listed if they...
8,836
Posted By ashwin3086
sudo in non interactive mode
Hi ,

I login to unix using my id and then do a sudo to execute any programs i want.


sudo su - <id>
password : xxxxxxx


Is there a way to make it non interactive so that i can use it...
3,202
Posted By ashwin3086
attachment in unix mail
Hi,

I am sending an attachment (log file) from unix script using uuencode command.
I am able to receive the attachment but when i view it outlook(2007) the file is not formatted when i view it...
3,782
Posted By ashwin3086
Hi , Can you explain how the command...
Hi ,

Can you explain how the command works.. I want to check different scenarios.
3,782
Posted By ashwin3086
HI , Guess even gawk is not supported. ...
HI ,

Guess even gawk is not supported.

I m getting the following error.

-bash: gawk: command not found
3,782
Posted By ashwin3086
Hi , When i run it i am getting the...
Hi ,

When i run it i am getting the following error...



Probably mine is a different version from yours .Mine is Sun Os 5.1
3,782
Posted By ashwin3086
Grep for a particular word and get only the word
HI,

Let us a consider i have a file as following.

abcde (flag5 / 234 ) Mod 45 efgh
afghd (flag3/ 343) MOD 34 ghdd
tryd (t_flag6/ 567 ) MOD 43 uifudiu


Is there a way where I need only...
1,833
Posted By ashwin3086
Comment based on a condition
I want to comment 2 lines based on a condition. If THEN occurs immediately after WHEN then i have to comment both the lunes

For example :



$cat file1.txt
CASE
WHEN
THEN 1...
4,319
Posted By ashwin3086
Thanks. But i am looking for a solution in...
Thanks.
But i am looking for a solution in unix not perl.
Showing results 1 to 25 of 80

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