Search Results

Search: Posts Made By: MattyV
948
Posted By MattyV
OK...well here is one way... 1) cat...
OK...well here is one way...

1) cat [your_first_mysqloutput_file] | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > your_first_new_file.csv
2) Do the same to the file you want to append to the first...
2,540
Posted By MattyV
NetCat is best for that...
I endorse using netcat for this.
"nc -l 3343 " begins listening on port 3343. I've used this to tie serial to TCP/IP, strait TCP/IP, etc. See ...
3,984
Posted By MattyV
So what I meant was that if the stock value was 1...
So what I meant was that if the stock value was 1 dollar, the 19th string would contain "[1]" substr [1],2,2 would result in "1]"

I meant the alternative awk statement I wrote using substr...
2,021
Posted By MattyV
OK I think I know what's up...
From the READ manual...

If count is zero, read() returns zero and has no other results. If
count is greater than SSIZE_MAX, the result is unspecified
Also I did a little test...
...
9,532
Posted By MattyV
No problem...
Thank god for the date command. This is how I would attack this...


date -d "03/16/1970" '+%d-%b-%Y %H:%M:%S'
16-Mar-1970 00:00:00

date -d "March 16 1970" '+%d-%b-%Y %H:%M:%S'
16-Mar-1970...
1,509
Posted By MattyV
Many ways to skin a cat...
Kumarjit, this really depends on the OS and way the remote directory is accessed.

For instance if you mount a remote windows box, I strongly recommend using gvfs to mount the remote local...
3,984
Posted By MattyV
How it works...
Well, you are correct in stating that $19 is the 19th string. This is what I get with your original code...

echo '[30376] 2013-02-23 10:00:41 DOW=7 HOUR=10:00 WK=4 DOM=23 MON=2 -
Total [98],...
16,922
Posted By MattyV
I have updated this based on some of the feedback...
I have updated this based on some of the feedback from Corona688

#WRITTEN BY MVONA; FREE TO USE AND ABUSE
#THE WORK "WORKS FOR ME" TM
#THIS SCRIPT CONNECTS TO FTP SERVERS AND DOWNLOADS STUFF...
1,300
Posted By MattyV
I took your example file: 1000 1 1000 10 ...
I took your example file:
1000 1
1000 10
1000 11
1000 20
1000 21
1000 30
2000 1
2000 10named it as unsorted.txt and ran the following statement...
sort -k 1 -k 2 -n unsorted.txt | awk '...
16,922
Posted By MattyV
An example shell script to ftp with...
You can modify this script to take parameters and download instead of upload...


#!/bin/sh
#THIS SCRIPT CONNECTS TO THE FTP SERVER
PASSWD='xxx'
USER='xxx'
full_file="$1"

cp $full_file . 1>...
Showing results 1 to 10 of 10

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