Search Results

Search: Posts Made By: shekharjchandra
3,023
Posted By shekharjchandra
Thanks Panyam, I tried in another method...
Thanks Panyam,

I tried in another method and it worked.

head -1 file | sed 's/[^|]//g' | wc -c

Regards
3,023
Posted By shekharjchandra
Count the number of fields in column
Hi
I was going through the below thread
https://www.unix.com/shell-programming-scripting/48535-how-count-number-fields-record.html

I too have something similar requirement as specified in...
13,650
Posted By shekharjchandra
Hi Thanks to all who looked into this issue....
Hi
Thanks to all who looked into this issue. Actually I havent searched this error in Google or here in this forum, and I have directly pasted this error to this chain of post.

Thanks Methyl...
13,650
Posted By shekharjchandra
I tried doing unix2dos but I got this error ...
I tried doing unix2dos but I got this error

could not open /dev/kbd to get keyboard type US keyboard assumed
could not get keyboard type US keyboard assumed
13,650
Posted By shekharjchandra
How: FTP in shell Script without asking password.
Hi
In my shell script I am generating one text file and this text file I want to place in Mount point. THis mount point is havig access to Windows.

I want to put the file in this mount point...
1,855
Posted By shekharjchandra
Hi if my infile contains the data in following...
Hi if my infile contains the data in following format

002010764| +.00|12/11/04|12/11/05|n^002010764| +.00|12/11/05|12/11/06|n^002010764| +.00|12/11/06|10/11/07|n^

Where ^ in red is a box...
1,855
Posted By shekharjchandra
Hi Kevintse I have tried in following way ...
Hi Kevintse
I have tried in following way

$ --> unix2dos file1.txt > file2.txt
could not open /dev/kbd to get keyboard type US keyboard assumed
could not get keyboard type US keyboard assumed...
1,855
Posted By shekharjchandra
Can anyone give some example on this unix2dos and...
Can anyone give some example on this unix2dos and dos2unix.
1,855
Posted By shekharjchandra
HOW: Dealing with new line character Wiindows-vs-UNIX
Hi
I am getting this similar below lines, by splitting one big file by using the code in my shell script

Line is:-
111111111| +.00|12/11/04|12/11/05|n
222222222| +.00|12/11/05|12/11/06|n...
1,611
Posted By shekharjchandra
HOW: Shell script accessing files located in individual logged in user.
Hi
I have below scenario, I hope this could be possible, but as of now no idea how to implement this.

Mount point in this location /abc/mp, and there will different users who will be executing...
28,921
Posted By shekharjchandra
Passing filename dynamically in SPOOL of SQL*PLUS in shell script
Hi all,
I am executing shell script in which I am using SQLLDR
In this SQLLDR I am passing text file having PL/SQL script. This script will produce some formated output, this output I have to...
3,525
Posted By shekharjchandra
How to avoid Newline character in generated text file?
Hi All,
Just need small help in resolving the special new line character in generated output file.

In one of my shell script I am using following lines to get the spool file (i.e. sfile.txt)...
2,850
Posted By shekharjchandra
Improper wrapping of text in split of file
Hi
I am using shell script where I am calling SQLPLUS and executing one PL/SQL block.

This PL/SQL block generates the spool file for example splfile.txt.
After successful generation of spool...
14,358
Posted By shekharjchandra
Yes you are right... I feel definately I should...
Yes you are right...
I feel definately I should have windows machine IP or Windows machine name with FTP installed and user account to connect.

Regarding Samba client utils, I need to look into....
14,358
Posted By shekharjchandra
FTP from Unix Shell script to Windows Shared folder ?
Hi
Before Posting my query in this forum, I have gone through various similar postings to get some idea on ftp and how to do that from unix shell script to windows server.
My question is related...
3,105
Posted By shekharjchandra
Dear Scrutinizer, I appreciate your...
Dear Scrutinizer,

I appreciate your lateral thinking :) it worked out

Thanks to all who posted their views in resolving my issue.

It was a great learning ....

Regards
JC
3,105
Posted By shekharjchandra
Hi I even tried the way as suggested, but I am...
Hi
I even tried the way as suggested, but I am getting the same error


nawk -F"|" -v var1="${v_projectname}" -v var2="${v_networkid}" ' {
fn=(length($1)==4)?"ADDR":"SLICE"
print > "ABS_" fn...
3,105
Posted By shekharjchandra
Hi Sorry to trouble ... This is my actual...
Hi
Sorry to trouble ...
This is my actual code


nawk -F"|" -v var1="${v_projectname}" -v var2="${v_networkid}" ' {
fn=length($1)==4?"ADDR\_":"SLICE\_"
print > "ABS_" fn "_" var1 "_" var2...
3,105
Posted By shekharjchandra
Sorry I tried exactly the same but I got...
Sorry I tried exactly the same but I got following error

nawk: syntax error at source line 1
context is
{fn=length($1)==4?"ADDR\_":"SLICE\_" ; print > "ABS_" >>> fn <<< "_" var1 "_"...
3,105
Posted By shekharjchandra
Hi I used this below code but somehow I am not...
Hi
I used this below code but somehow I am not getting the files generated and also I am not getting any error too


v_projectname=PROJ_X12
v_networkid=ddd77xER

nawk -F"|" -v...
3,105
Posted By shekharjchandra
Hi Franklin, As per your suggestion I...
Hi Franklin,

As per your suggestion
I have given the below command using nawk

nawk -F"|" -v var1="${v_projectname}" -v var2="${v_networkid}" '{fn=length($1)==4?"ADDR\_":"SLICE\_" print >...
3,105
Posted By shekharjchandra
Hi Thanks Franklin for your reply !!! ...
Hi

Thanks Franklin for your reply !!!

ctsgnb -> Sorry to confuse you !

Actually here by spfile I mean one of the spool file created through one of the standalone PL/SQL block in my...
3,105
Posted By shekharjchandra
Hi Thanks for your quick reply !! Any...
Hi
Thanks for your quick reply !!

Any clue on my second point i.e. using substring to find the fifth position character as "|" and then placing that entire line in first file
or else in second...
3,105
Posted By shekharjchandra
Splitting file into 2 files ?
Hi
extending to one of my previous posted query ....
I am using

nawk -v invar1="$aa" '{print > ("ABS\_"((/\|/)?"A\_":"B\_")invar1"\_NETWORKID.txt")}' spfile.txt

to get 2 different files...
3,766
Posted By shekharjchandra
Hi extending to my previous query .... ...
Hi
extending to my previous query ....

nawk -v invar1="$aa" '{print > ("ABS\_"((/\|/)?"A\_":"B\_")invar1"\_NETWORKID.txt")}' spfile.txt

Similar to invar1 variable in nawk I also need one...
Showing results 1 to 25 of 30

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