Search Results

Search: Posts Made By: bobbygsk
1,192
Posted By bobbygsk
Thank you - vgersh99, Scrutinizer, bakunin ...
Thank you - vgersh99, Scrutinizer, bakunin

Earlier I had to do it in 4-5 steps. Now I can do it in 1 easy step, thanks to you all
1,192
Posted By bobbygsk
Print 2 matching pattern
How to a first 3 lines lines that matches 1st pattern and 1 line that matches 2nd line.

Sample.txt
Line 1: /*--- ABC_BA_ABCABC -----*/
Line 2:
Line 3: insert_job: ABC_BA_ABCABC job_type: BOX...
3,091
Posted By bobbygsk
Thanks all for you time and your help. I'm...
Thanks all for you time and your help.

I'm trying to get files from linux to Windows 7 using WinSCP application through batch script (MS-DOS batch script)

I have files with extension "*.gz" in...
3,091
Posted By bobbygsk
Already provided it.
Already provided it.
3,091
Posted By bobbygsk
Linux rename with regular expression
Hello,

I have the following filenames
Instruments_20171004.csv_11-03-2017_20:01:06.gz
Instruments_20171030.csv.gz
Orders_0024_20171103.csv_11-03-2017_20:01:05.gz

I like to change the...
2,006
Posted By bobbygsk
The input is tab delimited and output should also...
The input is tab delimited and output should also be the same. But I do not need to change the space to tab.

Appreciate your time to help.
2,006
Posted By bobbygsk
Thanks. It works. Appreciate your help ...
Thanks. It works. Appreciate your help

---------- Post updated at 01:40 PM ---------- Previous update was at 01:37 PM ----------



Tried with FS="\t" before OFS="\t" but did not work.
...
2,006
Posted By bobbygsk
---------- Post updated at 11:24 AM ----------...
---------- Post updated at 11:24 AM ---------- Previous update was at 11:23 AM ----------



Hi Vgersh99...

The data has tab between columns. Not working.
Appreciate your help though
...
2,006
Posted By bobbygsk
Fill column from previous row
Hi,

I have the following content in file


ABBR DESC COL3 COL4 COL5 COL6
AAA text desc aaa text text text text
text text text text
text...
Forum: Programming 02-23-2016
4,334
Posted By bobbygsk
Secure FTP from Windows to UNIX
Looking for a way to secure ftp files from Windows to Unix through batch script.

This may not be related to Unix/Linux environment, but hoping some solution.


Our desktop (Win 7) does not...
2,204
Posted By bobbygsk
Get Hostname in UNIX like environment in Windows (Cgwin, UWin)
Hi,

I'm using UWIN (from at&t - a cygwin like environment) in my personal computer to show Unix like environment to someone new to Unix. Though UWin has Ksh command box, wanted to show Putty to...
3,958
Posted By bobbygsk
Thanks Don Cragun. Before this printf, I hard...
Thanks Don Cragun. Before this printf, I hard coded no.of records in header for all files. For the last file, I took of the header and I did word count by line, then echoed that number as header by...
3,958
Posted By bobbygsk
I tried the following before NR % lpf == 1 } ...
I tried the following before NR % lpf == 1
}
{ # count no. of lines
++cntRec
}
NR % lpf == 1 {
# 1st line of output file:
fn=sprintf("split.%03d.txt", ++ofc)
...
3,958
Posted By bobbygsk
Don Cragun's code works fine. But since I rarely...
Don Cragun's code works fine. But since I rarely use Unix, I'm not expert in awk.
My requirement changed and in header, it is needed to print no. of records in each file.
Though we are splitting...
6,993
Posted By bobbygsk
Regular Expression repeat pattern
Hi,

I'm struggling with very very simple task but dont know where I'm going wrong.
Have the following file numbers.txt
1
12
123
1234
12345
123456
1234567
12345678
123456789
1234567890...
3,958
Posted By bobbygsk
Thanks Don Cragun. So % works like escape...
Thanks Don Cragun. So % works like escape character within *print() functions
3,958
Posted By bobbygsk
Fixed after having curly braces after "BEFORE"...
Fixed after having curly braces after "BEFORE" and "END" instead of having it next line.

Besides I have another issue. Initially I had requirement to pass date and now the date is not needed. But...
3,958
Posted By bobbygsk
Again.. Issue. I have another Server - AIX. ...
Again.. Issue.
I have another Server - AIX.
awk, nawk and /usr/xpg4/bin/awk is not working.
Throwing following error
syntax error The source line is 3.
The error context is
...
3,958
Posted By bobbygsk
I have SunOS and awk did not work as it threw...
I have SunOS and awk did not work as it threw some error the following error

However /usr/xpg4/bin/awk worked.
3,958
Posted By bobbygsk
I guess something another print command to be...
I guess something another print command to be placed before and after
for header and trailer. But how?


Expected result.
split.001.txt
=============
001 of n files
record 1
record 2
.......
3,958
Posted By bobbygsk
I get 2 to 10 mil records file. I have to split...
I get 2 to 10 mil records file. I have to split them with 100,000 records in each file. Assuming that i mostly get 3 mil records, so I have to split the file in 300 files. What is the limit that awk...
3,958
Posted By bobbygsk
how do I embed the printf in awk. I also need the...
how do I embed the printf in awk. I also need the content of original file in all these split file based on no. of lines I like to split
3,958
Posted By bobbygsk
Split files with formatted numbers
How to split the file and have suffix with formatted numbers

Tried the following code
awk '{filename="split."int((NR-1)/2)".txt"; print >> filename}' split.txt

Current Result

Expected...
2,710
Posted By bobbygsk
Thanks all guys for the help. I used finger to...
Thanks all guys for the help.
I used finger to get the terminal session and compared it with ps -ef command. and killed it.
2,710
Posted By bobbygsk
This works for only current Putty Session. How...
This works for only current Putty Session. How about already opened Putty Session
Showing results 1 to 25 of 152

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