Search Results

Search: Posts Made By: Habitual
1,320
Posted By gary_w
Works on Solaris via PuTTY emulating a vt100...
Works on Solaris via PuTTY emulating a vt100 terminal:

$ cat x
#!/bin/bash

# Define terminal escape sequences.
GREEN="\033[1;32m" # bold, green
NORM="\033[0m"

text="A cat is on a cat...
1,794
Posted By Corona688
authorized_keys only works if the client actually...
authorized_keys only works if the client actually has the key that's been authorized.

Other systems will either need the same key under ~/.ssh/, or new keys which also must be added to...
2,108
Posted By Corona688
date -d requires GNU date.
date -d requires GNU date.
1,865
Posted By MarkSeger
noooooo... remember, the first question you...
noooooo...
remember, the first question you should as if you think what you want to do is probably useful to a lot of people I've probably already added a switch for it. ;)

collectl -sD...
1,865
Posted By neutronscott
Include the whitespace and use "extended" regex. ...
Include the whitespace and use "extended" regex.


grep -Ev '([ \t]+0){13}' input
grep -Ev '([[:space:]]+0){13}' input
13,095
Posted By pamu
try this.....
L_Date=`date --date="last month" +%m_%Y`
mv Amount.zip Amount_$L_Date.zip
4,212
Posted By alister
Welcome to the forums, cuantica: Someone had...
Welcome to the forums, cuantica:

Someone had a similar problem very recently. This post may be of use to you: https://www.unix.com/302662831-post17.html

Regards,
Alister
1,812
Posted By migurus
To capture part of the output of your grep into a...
To capture part of the output of your grep into a variable you can do following:


your_script | while read col1 col2 col3; do # this will place "words" of your output into col1 col2 col3...
2,319
Posted By neutronscott
pidfile=/var/tmp/stats.pid # exit if another...
pidfile=/var/tmp/stats.pid

# exit if another is running
[ -e "$pidfile" ] && exit

# create pid file
echo $$ >"$pidfile"

# delete pid file on exit (may have to do this definitely depending...
1,989
Posted By Scrutinizer
What do you mean with pasting? Are you...
What do you mean with pasting? Are you copy-pasting while editing a file? In what editor?
4,393
Posted By balajesuri
printf does not output the trailing newline, by...
printf does not output the trailing newline, by default.

So if you do this at command line: printf "\033[2;32mHello\033[0m" you would see hello on console in green and the prompt right next to it.
7,161
Posted By lupin..the..3rd
cron job to run on second to last friday each month
I needed a cron job to run on the second to last friday of every month. Our servers are running HP-UX, and the HP-UX date command is pretty basic and does not have all of the fancy options that...
5,737
Posted By methyl
Never heard of it.
Never heard of it.
2,821
Posted By methyl
The correction idea in post #2 contains a basic...
The correction idea in post #2 contains a basic scripting error:

There are no spaces either side of the equals sign. This is not a syntax error BUT the "if" will always return "true" regardless of...
2,821
Posted By admin_xor
A very happy new year to you too!! :b: Well,...
A very happy new year to you too!! :b:

Well, it's obvious why you never got E-mail 'cause you are actually checking the exit status of echo command which is giving 0 and the first if block gets...
2,913
Posted By methyl
Maybe your local terminal emulator is not set to...
Maybe your local terminal emulator is not set to "wrap" long lines and the output is actually there but you can't see it. Try redirecting the output to a file and check whether the characters are...
Forum: UNIX and Linux Applications 08-25-2011
2,901
Posted By 3magic
re
In the Firefox Location bar, go to about:crashes. A page listing crash reports that you've submitted will appear.

If you cannot start Firefox,


Click on the latest crash under Report ID.
Forum: UNIX and Linux Applications 08-22-2011
2,691
Posted By dude2cool
is your client's SVN repo under...
is your client's SVN repo under /opt/svn/repos/ftpweb? atleast from above, it looks client is connecting to repo under /opt not under /mnt/data-files/svn/repos/ftpweb

post output from ls -ld...
4,720
Posted By zaxxon
Which shell are you using? If you are using a...
Which shell are you using? If you are using a shell, those ;\ at the end of each line should not be needed.
What exact error do you get? Maybe add set -x in the 1st line for debugging to see where...
1,776
Posted By Chubler_XL
How about something like this: #!/bin/bash ...
How about something like this:

#!/bin/bash
menu_items=(
"30 Minutes" "1 Hour" "6 Hours" "12 Hours" "1 Day"
"1 Week" "1 Month" "3 Months" "1 Year" "2 Years"
"3 Years" "Never" )
...
1,315
Posted By yazu
To get the last <div>...</div> between $start and...
To get the last <div>...</div> between $start and $end:
$ start='<!-- // CONTENT STARTS HERE -->'
$ end='<!-- // CONTENT ENDS HERE -->'
$ curl -s...
1,828
Posted By aigles
From crontab you can do : minute hour...
From crontab you can do :
minute hour day_of_month month day_of_week your_script.sh%1%yes%n%64

Jean-Pierre.
6,992
Posted By jlliagre
Assuming you have GNU date available: $ s=$((...
Assuming you have GNU date available:
$ s=$(( $(date -d "Jul 13 01:02:01" +%s) - $(date -d "Jul 12 16:02:01" +%s) ))
$ printf "%02d:%02d:%02d\n" $((s/3600)) $((s%3600/60)) $((s%60))
09:00:00
29,095
Posted By jim mcnamara
try find . -mmin -$(( 28 * 60 ))
try

find . -mmin -$(( 28 * 60 ))
2,698
Posted By neutronscott
root@wrtu54g:~# vnstat --dumpdb | awk -F';' '$2...
root@wrtu54g:~# vnstat --dumpdb | awk -F';' '$2 == hr && $1 == "h" { print $4 FS $5 }' hr=`date +%H`
128570;4814
Showing results 1 to 25 of 29

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