Search Results

Search: Posts Made By: LivinFree
21,718
Posted By LivinFree
Cygwin allows you to use either CR/LF or LF line...
Cygwin allows you to use either CR/LF or LF line endings - it's a registry key setting, IIRC.

Try running dos2unix on your shell script to change CR/LF to LF.
21,718
Posted By LivinFree
Why sed and not cat? I suppose you could do...
Why sed and not cat?

I suppose you could do something like sed : file1 file2
2,662
Posted By LivinFree
The OP said Flash. Other options are PXE booting...
The OP said Flash. Other options are PXE booting + NFS. Truly diskless workstations are out there.
12,619
Posted By LivinFree
Your $DISPLAY variable is not getting set for...
Your $DISPLAY variable is not getting set for some reason.
Forum: Red Hat 03-24-2011
8,059
Posted By LivinFree
Is the output on stdout and not stderr (fd2)?
Is the output on stdout and not stderr (fd2)?
Forum: What is on Your Mind? 03-24-2011
20,987
Posted By LivinFree
You can see what it is at: Home -> Menu ->...
You can see what it is at:
Home -> Menu -> Settings -> (page 2) -> Device Email

You can change the address online, and set up allowed source email addresses. I don't remember what the default...
Forum: IP Networking 03-23-2011
3,580
Posted By LivinFree
What OS/utility version are you using? On a...
What OS/utility version are you using?

On a GNU/Linux system, I can run this:

# lsof -Pni4 | grep -c ":22 "
2
#


In my case, I'm just counting ssh sessions. You can change ":22 " to...
33,028
Posted By LivinFree
I like scripting in bash. It's close to POSIX,...
I like scripting in bash. It's close to POSIX, and a contender for ksh, which I haven't used a lot in the last few years, since I work almost exclusively on GNU/Linux kit.

My gripes about bash are...
Forum: Solaris 03-22-2011
3,074
Posted By LivinFree
Easy enough. #! /bin/bash ...
Easy enough.

#! /bin/bash

filename=my.test.file.flag
if [[ "$filename" =~ "flag" ]]; then
printf '%s\n' "Matched flag"
fi
Forum: Solaris 03-22-2011
3,074
Posted By LivinFree
OK, how about: #! /usr/bin/ksh for file...
OK, how about:

#! /usr/bin/ksh

for file in *; do
if [[ "${file:(-4)}" == "flag" ]]; then
# Do some processing here. Maybe:
/bin/mv "$file" /tmp/
else
# Do something else. Maybe...
Forum: Solaris 03-22-2011
3,074
Posted By LivinFree
You need to be very clear here. What do you...
You need to be very clear here.

What do you mean by "suspending" based on a file? What exactly do you want to do?
Forum: Solaris 03-22-2011
3,074
Posted By LivinFree
I'm not sure I understand completely. Do you...
I'm not sure I understand completely.

Do you want the filename minus ".flag"? If so:

#! /usr/bin/ksh

testfile=my.test.file.flag
printf '%s\n' "${testfile%.flag}"
3,763
Posted By LivinFree
Look again at fpmurphy's suggestion. The ssh...
Look again at fpmurphy's suggestion. The ssh daemon attempts to be secure, and doesn't always like world-readable files, especially files that shouldn't be, like ~/.ssh/authorized_keys2 or...
7,870
Posted By LivinFree
If you specify . ./file.ksh, it's like running...
If you specify . ./file.ksh, it's like running the contents of that file in your current shell. It's a bit smarter than this, but think of it running:
while read line; do "$line"; done <file.ksh...
8,667
Posted By LivinFree
OK, here's try #2: #! /bin/bash for...
OK, here's try #2:

#! /bin/bash

for file in /logs/logfile.*; do
while read ip; do
if [[ "${file#${file%??}}" == ".Z" ]]; then
# This is a compressed file - it ends with .Z - use zgrep...
4,345
Posted By LivinFree
Please use [code] tags around your output to help...
Please use [code] tags around your output to help line it up properly.

I'm not sure what you mean - is it really full, or are you out of inodes (two different issues)? If it says it's full, and...
8,667
Posted By LivinFree
My first guess would be: #! /bin/bash ...
My first guess would be:

#! /bin/bash

logfile=/path/to/logfile
while read ip; do
zgrep "$ip" $logfile > output_logfile_${ip}
done <iplist


It could be done more elegantly, and maybe...
2,604
Posted By LivinFree
I'm rather fond of pdsh, which includes pdcp for...
I'm rather fond of pdsh, which includes pdcp for copying files to/from a large number of nodes.
3,531
Posted By LivinFree
What is your input filename and expected output...
What is your input filename and expected output filename set?

As a proof of concept, assume I put your example in "tmp.in" and ran this script:

#! /bin/bash

declare i=1
while read line; do ...
12,891
Posted By LivinFree
More importantly, what 'tar' do you have? For...
More importantly, what 'tar' do you have? For example, nothing is stopping you from running GNU tar on a Solaris-kernel system. Nothing prevents you from writing or modifying your own tar command and...
5,303
Posted By LivinFree
Assuming this is a Linux kernel, have you tried...
Assuming this is a Linux kernel, have you tried looking in the /sys filesystem?

It's all driver and device specific, so I can't give you any better answers in this case off-hand, but here's some...
1,901
Posted By LivinFree
You need to be very specific. If you're...
You need to be very specific.

If you're launching an ssh client, see your client's documentation for it's support for ANSI color codes, or set the defaults in it's preferences.

What client...
7,041
Posted By LivinFree
I'd buy Bill Joy a beer for vi, but punch him...
I'd buy Bill Joy a beer for vi, but punch him halfway through the round for NFS and csh.

I guess we shouldn't blame him completely, though. NFS and csh were good for their time - it's those lousy...
7,041
Posted By LivinFree
This works in bash: echo ${PWD##*/} ...
This works in bash:

echo ${PWD##*/}


[Edit: Derp - I somehow missed everyone else's replies. Sorry for the repeat.]
8,255
Posted By LivinFree
The ext4 filesystem supports a 'relatime' option...
The ext4 filesystem supports a 'relatime' option to avoid those extraneous small-I/O writes every time you touch a file. This isn't usually a big deal on single-spindle disks, but if you run a large...
Showing results 1 to 25 of 500

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