Search Results

Search: Posts Made By: jnrohit2k
1,166
Posted By jnrohit2k
I really apologize for not giving complete detail...
I really apologize for not giving complete detail about command, OS, Shell etc.

I tried this solution and it worked as expected. I need to do some work around on my file because all rows are not...
1,166
Posted By jnrohit2k
Enclose String in single quote
I have a comma separated file which contains data like;

File header:
ID_WVR,SAK_WVR_SVC,DSC_WVR_WVC,SAK_PROCEDURE,CODES,CDE_PROC_MOD ,CDE_PROC_MOD_2 ,CDE_PROC_MOD_3

File Detail:...
785
Posted By jnrohit2k
Perl Scripting Question
I know shift takes the element out from an array and single pipe symbol (|) is a bitwise or operator, but what two pipe symbols (||) is doing in below piece of code?


#!/usr/bin/perl -w
...
1,361
Posted By jnrohit2k
Perl - Use of *? in Matching Pattern
I am using Perl version 5.8.4 and trying to understand the use of regular expression. Following is my code and output.


$string = "Perl is a\nScripting language";
($start) = ($string =~...
15,936
Posted By jnrohit2k
Yes, I received the "required result" when I send...
Yes, I received the "required result" when I send as an attachment and click on the attachment it opens it up in a browser. I need the same result in the body of my mail client. I am using MS Outlook...
15,936
Posted By jnrohit2k
HTML table in email body using C Shell
I am using Sun Solaris ver. 5.10 and trying to send an HTML table in email body using mail command in C shell script.

I tried following commands:-

#1
mail -m "MIME-Version:...
1,487
Posted By jnrohit2k
It worked. Can you please explain why you used...
It worked. Can you please explain why you used 119 and what curly '{' braces do?

Thanks!
1,487
Posted By jnrohit2k
I am not sure how can we identify a particular...
I am not sure how can we identify a particular portion of a line using sed and replace it. So I am not sure if it is possible with sed.
1,487
Posted By jnrohit2k
How to identify particular section using sed?
Hi, I have following data in a file. Not all but most of the lines start with letter 'T' has 8 SPACES from column 121 to 128 and I want to replace that portion with some dummy value. Is it possible...
7,805
Posted By jnrohit2k
Find duplicate words using sed
I have following statement and I want to find duplicate word using sed command. How is it possible?

"detect string and remove the duplicate string"

There could be many statements in a file...
6,597
Posted By jnrohit2k
Autosys Job: Job did not start
I have submitted an autosys job and force start it. Autosys hit the job 4 times to restart but it did not start and finally I terminate the job. Any idea why the job did not start. Below is the code...
1,985
Posted By jnrohit2k
Sorry, I did a mistake here. The awk command...
Sorry, I did a mistake here. The awk command should be;

awk -F';' '{split($7,a,","); print $17 "%" a[3] "%" $15 "%" $16 "%" $0}' temp1.dat | sort -t '%' -k 1r -k 2n -k 3n -k 4nr

It gave me...
1,985
Posted By jnrohit2k
I have a text file and each field is separated by...
I have a text file and each field is separated by semicolon ( ; ). Field number 7 is internally separated by comma ( , ) and pipe ( | ) symbol. I want to sort file based on four different fields...
1,985
Posted By jnrohit2k
It worked. Thanks!
It worked. Thanks!
1,985
Posted By jnrohit2k
Sort mixed data file
I have a text file and each field is separated by semicolon ( ; ). Field number 7 is internally separated by comma ( , ) and pipe ( | ) symbol. I want to sort file based on three different fields...
10,815
Posted By jnrohit2k
I tried below command and it worked but it is...
I tried below command and it worked but it is adding one more line if there is already a blank line at the end of file.

perl -p -e "s/$/\x0a/"

I also cannot use any other Shell. Let me know...
10,815
Posted By jnrohit2k
How to add newline character at end of file?
Hi All,

I have following piece of code in UNIX C Shell script and I want to add one more command which can add newline at the end of file only if there is no newline character exists.

...
3,752
Posted By jnrohit2k
Thanks. It worked. Can I use column number with...
Thanks. It worked. Can I use column number with sed command?
3,752
Posted By jnrohit2k
How to replace last 8 digits?
Hi,
How I can replace last 8 ZEROS with 22991231?

19523479811841494432A2013052700000000
19523479811730333980A2013052700000000
19523479811417044397A2013052700000000...
2,048
Posted By jnrohit2k
Awesome. It worked. Thanks alot.
Awesome. It worked. Thanks alot.
2,048
Posted By jnrohit2k
When I do sort on original file it works but...
When I do sort on original file it works but after adding line number it do not.

Original File:
19523479811841494432A2013052700000000
19523479811730333980A2013052700000000...
2,048
Posted By jnrohit2k
Thanks Rudic. This was the first time I post...
Thanks Rudic. This was the first time I post query on this forum. Could you please tell me how I can use code tags and what I need to do for that?

Thanks!
2,048
Posted By jnrohit2k
How to add line number using UNIX command?
Hi,

I am working on Shell script and I have a .dat file in which I want to add line numbers. Please see below example file

Input File:

19523479811841494432C2013052700000000...
Showing results 1 to 23 of 23

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