Search Results

Search: Posts Made By: nickg
43,406
Posted By nickg
[Solved] SFTP error - Couldn't close file: Failure
I am trying to send a file from my 9000 box to a vendor using sftp and I am getting this error: Couldn't close file: Failure

Here are the results of my automated script:

Connected to yyy.com....
4,486
Posted By nickg
Thanks Jim! Works great.
Thanks Jim! Works great.
4,486
Posted By nickg
End of file with while loop
(sh shell) I have a function I am using that does a date calculation so I can subtract dates.

get_JD () {
bc << MSG
scale=0
date calculation ……….......
MSG
}

Then I have this little...
8,296
Posted By nickg
I tried that. It did not work. It is not a big...
I tried that. It did not work. It is not a big deal. I am able to duplex and that is the main thing. Thanks.
8,296
Posted By nickg
Thanks for that info. I don't think my printer...
Thanks for that info. I don't think my printer likes the sides = command because it is not working either way.
8,296
Posted By nickg
So this would do the trick if my printer allows...
So this would do the trick if my printer allows for it?

lp -o sides=two-sided-short-edge filename
8,296
Posted By nickg
I don't know anything about short edge binding,...
I don't know anything about short edge binding, however, I did mess with this a little:

lp -o sides=two-sided-short-edge filename

Is this what you are talking about?


What I was saying in...
8,296
Posted By nickg
Help with duplex printing
I am able to use duplex printing with the -o duplex option. I am also printing landscape. It prints on the back of the page, however, I have to flip the page in order to see the other side right side...
13,432
Posted By nickg
printf formatting
Is there a way to make these 2 numbers - $482477.37 and $1875000.00

look like $482,477.37 and $1,875,000.00 with printf?
4,075
Posted By nickg
Thanks vgersh99. That is what I used.
Thanks vgersh99. That is what I used.
4,075
Posted By nickg
cat command
I believe I used the cat command to append a file beside another file (instead of below it) but I did not document it any where and I can't remember exactly how I did it. Has anyone else done this? I...
9,229
Posted By nickg
I got this from phv and it works good. awk...
I got this from phv and it works good.

awk '
/FRM CHK 000000/{x="";getline;next}
{if(x)print x;x=$0}
END{if(x)print x}
' filename
9,229
Posted By nickg
pmm - we don't have nawk on our system. Thanks...
pmm - we don't have nawk on our system. Thanks though.

cfajohnson- your script prints the lines I am looking for. I am looking to delete those lines (and print everything except those lines).
9,229
Posted By nickg
find pattern, delete line with pattern and line above and line below
I have a file that will sometimes contain a pattern. The pattern is this:


FRM CHK 0000



I want to find any lines with this pattern, delete those lines, and also delete the line above and...
5,000
Posted By nickg
find pattern delete line with pattern and line above and line below
I have a file that will sometimes contain a pattern. The pattern is this:


W/D FRM CHK 00

I want to find any lines with this pattern, delete those lines, and also delete the line above and the...
4,452
Posted By nickg
remove whitespace
Thanks vgersh99.
I got this from another area of the forum (I looked first but not good enough). This is what I needed.

sed -e 's/[ ]*,[ ]*/,/g' -e 's/^[ ]*//' -e 's/[ ]*$//' file1
4,452
Posted By nickg
remove whitespace
I combined 2 files using the paste command. It gave me something like this:

123445 ,AABBNN
22344 ,BBVVMM


I want to remove the whitespace...
1,505
Posted By nickg
appears 4 or more time
I have a file like this:

111 AA 100.00
111 AA 200.00
TOTALS 2 300.00
111 ...
13,360
Posted By nickg
Thank you azbest. This needs to be an automated...
Thank you azbest. This needs to be an automated script and your example is working just like I need it to.
13,360
Posted By nickg
If you are going to respond, please try to answer...
If you are going to respond, please try to answer my question instead of asking me why I am doing what I am doing. Obviously, I have a good reason for doing it or I would not be posting this.
13,360
Posted By nickg
adding time
I want to write a little script that will add 24:00 to the current time if the current time is in between 00:00 and 05:00. I want to make this new time a brand new file so I can work with it. I am...
13,253
Posted By nickg
Worked like a charm!! Thanks.
Worked like a charm!!

Thanks.
13,253
Posted By nickg
regular expression and awk
I can print a line with an expression using this:

awk '/regex/'


I can print the line immediately before an expression using this:

awk '/regex/{print x};{x=$0}'


How do I print the line...
3,834
Posted By nickg
awk
It is simple and does what I need it to do. I do know what it does. I have comment lines (which I did not include) in the file so I never forget what it does. :)

Note: we do not have the nawk...
3,834
Posted By nickg
awk
I ended up using this: (with the help of a co-worker)


awk -f NICKAWK3 FILE1 > FILE3

Here is my NICKAWK3 file:

BEGIN {
while ((getline < "FILE2") > 0)
{
...
Showing results 1 to 25 of 32

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