Search Results

Search: Posts Made By: neutronscott
1,470
Posted By neutronscott
something like: awk -F\| '!a[$1]++ {...
something like:


awk -F\| '!a[$1]++ { print $1 > "dis_col1.txt"; } !b[$2]++ { print $2 > "dis_col2.txt"; } END { print NR; }' file
830
Posted By neutronscott
illogical for journalctl but useful for other...
illogical for journalctl but useful for other date utility:


mute@zbox:~$ date -d 'tomorrow + 3 days'
Thu Jul 26 17:11:48 EDT 2018
2,804
Posted By neutronscott
Try: openssl s_client -connect myservice.com:443...
Try: openssl s_client -connect myservice.com:443 to do SSL connection.
Forum: BSD 03-03-2018
7,016
Posted By neutronscott
If you can ping them there is a route.. nothing...
If you can ping them there is a route.. nothing funny in the hosts firewall? Can you post the output of pfctl -sr
Forum: OS X (Apple) 09-11-2017
71,310
Posted By neutronscott
mute@zbox:~$ type time time is a shell keyword ...
mute@zbox:~$ type time
time is a shell keyword
mute@zbox:~$ dash
$ type time
time is /usr/bin/time


Look at dash manual. It doesn't provide a time. bash has a built-in time, so it can time...
Forum: Linux 09-03-2017
3,799
Posted By neutronscott
Previously how? Different CentOS version? This...
Previously how? Different CentOS version? This machine is the router?
4,343
Posted By neutronscott
From the EXPECT manual: "any matching and...
From the EXPECT manual: "any matching and previously unmatched output is saved in the variable expect_out(buffer)"

You could use regexp to do a substring match of that, or just use expect again...
937
Posted By neutronscott
mute@zbox:~$ sed '/\r$/{N;s/\r\n//}' 4_test.csv ...
mute@zbox:~$ sed '/\r$/{N;s/\r\n//}' 4_test.csv
123456
7890AB


I'm usually an awk guy myself but this seemed worthy
8,765
Posted By neutronscott
I think you're better off starting with: ...
I think you're better off starting with:


ssh host bash -s << 'EOF'
nu() {
whatever
}
nu
EOF


This starts a remote shell and reads the script from stdin, which you give with a heredoc
1,016
Posted By neutronscott
It's not clear what $2 and $3 are .. It...
It's not clear what $2 and $3 are ..

It looks like you convert $3, so I assume that's file.pdf

tesseract's output would be in file.pdf.txt since you didn't use ${3%.*} as you did elsewhere. But...
2,272
Posted By neutronscott
I can't help much with SOAP, but I'm certain what...
I can't help much with SOAP, but I'm certain what you have as SOAPInput should be the body of the message, not mixed in with the headers, as headers cannot contain newlines.
850
Posted By neutronscott
Please remove some ('s and try again. :) If...
Please remove some ('s and try again. :)

If I had to take a wild guess, you do something that ends up returning an empty string and therefore csh doesn't see the ending ).
1,081
Posted By neutronscott
Looks like your quoting is a bit crazy. This...
Looks like your quoting is a bit crazy. This works and is easier to read:


echo "$consumable" | sed 's#OK.#<span style="background-color:green;font-weight:bold;">OK</span>#g'
776
Posted By neutronscott
while executes commands as long as a test...
while executes commands as long as a test succeeds.

read will not succeed at EOF from taskfile.txt and the loop will stop.

if the last line is not in fact a line (it doesn't end with \n), then...
942
Posted By neutronscott
If you're OK to define the list of words, you can...
If you're OK to define the list of words, you can use something like this:


while read password; do
case $password in
linux)
echo "Close but no cigar!"
;;
unix)
...
3,019
Posted By neutronscott
I know Windows 7 has AppLocker but I don't think...
I know Windows 7 has AppLocker but I don't think you can do this on time-of-day. Perhaps you'd need to schedule a task that imported a local security setting.
3,773
Posted By neutronscott
"The Awk Programming Language" (Aho, Kernighan...
"The Awk Programming Language" (Aho, Kernighan and Weinberger, 1988) is still highly recommended by #awk on freenode IRC.
Forum: Solaris 01-05-2016
2,245
Posted By neutronscott
From the manual: Cmnd_Alias SHELLS =...
From the manual:


Cmnd_Alias SHELLS = /usr/bin/sh, /usr/bin/csh, /usr/bin/ksh,\
/usr/local/bin/tcsh, /usr/bin/rsh,\
/usr/local/bin/zsh

%wheel ALL = ALL, !SHELLS


This should help...
Forum: Solaris 01-05-2016
2,245
Posted By neutronscott
Unless you really limit what command that is,...
Unless you really limit what command that is, there are many clever ways to invoke a shell. Many users would sudo su or sudo bash, but you can even sudo vi and invoke a shell.

man 5 sudoers has...
766
Posted By neutronscott
You kill yourself since L3LikeQueueManager is in...
You kill yourself since L3LikeQueueManager is in your scripts arguments as well. But a while loop would be better then having the two functions call each other and potentially filling up the stack.
2,040
Posted By neutronscott
This at least works in GNU sed ...
This at least works in GNU sed


mute@tiny:~$ sed -n '/key1:/{s/key1: //;h};/^key2:/{H;x;s/\nkey2://p}' input
ABC DEF
GGG HHH


Place it in hold space. Append key2 to hold space, swap...
Forum: AIX 10-29-2015
9,315
Posted By neutronscott
Usually you'd get a line like: Enter file in...
Usually you'd get a line like:

Enter file in which to save the key (/home/mute/.ssh/id_rsa):


So it looks to me like your $HOME is unset and you can't save to //.ssh
834
Posted By neutronscott
Have you tried it? If you press a tab while...
Have you tried it? If you press a tab while typing that command out, Vim will display a ^I to the screen but afterwards your file will be tabulated.
834
Posted By neutronscott
In this case the ^I was meant to be inserted by...
In this case the ^I was meant to be inserted by pressing the TAB key on your keyboard. The caret symbol often denotes a control code achieved by holding down control and pressing the next letter.
2,228
Posted By neutronscott
find "${dir:-.}" -type f -perm u+r | wc -l ...
find "${dir:-.}" -type f -perm u+r | wc -l


See Bash Reference Manual: Shell Parameter Expansion (http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion).
Showing results 1 to 25 of 500

 

Featured Tech Videos

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