Reputation
289
Top tag
Next privilege 300 Rep.
Create new tags
Badges
2 7 17
Newest
 Curious
Impact
~41k people reached

  • 0 posts edited
  • 1 helpful flag
  • 96 votes cast
May
13
comment Interrupting rsync with ctrl-c, should I use `--partial` or `--append`?
on Fedora 20 man rsync the option --append says ... Implies --inplace
May
13
comment Interrupting rsync with ctrl-c, should I use `--partial` or `--append`?
If I want to interrupt rsync with ctrl-c, I would use --append? Because --partial by itself would not resume.
Apr
24
comment What's the point in redirecting output of grep to /dev/null?
if the documentation is correct "the exit status is 0 even if an error occurred"... I think -q option does not seem appropriate... because you want it to know about the error by checking the exit status.
Nov
21
comment How to check how many lanes are used by the PCIe card?
in your example the output text has both width x16 and width x8. I assume this is interpretted as: the link capacity is width x16 and this device has negotiated width x8?
Oct
10
comment How do you configure the MTU for all network adapters via a script?
Because it's going to be part of an installer script that will be used on many machines.
Oct
8
comment How do you configure the MTU for all network adapters via a script?
@itsbruce, ah thanks for the clarification regarding your changes being non-persistent. I updated and further clarified the "persistent" aspect of the question.
Oct
8
comment How do you configure the MTU for all network adapters via a script?
does ip* set mtu 4096* require a service network restart for changes to take effect?
Oct
8
comment How do you configure the MTU for all network adapters via a script?
I was thinking to myself: 1. list all the /etc/sysconfig/network-scripts/ifcfg-eth* files 2. iterate over the list 3. add a new line for each config file MTU=4096 4. optionally do a service network restart
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, what is the line of code shift $(($OPTIND - 1)) doing?
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, yep your new revision achieves the same thing my edits do and is a little cleaner than mine! good job. i'm gonna chalk that up to my inexperience of shell scripting =).
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, dash, in this context, is ubuntu's default shell? that is why your script specifies /bin/sh instead of /bin/bash?
Aug
29
comment How do you colorize only some keywords for a bash script?
I changed the script a little to get the behavior I wanted.
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, when I specify -b white the background color is actually gray instead of white. I think that is a function of my shell/OS/terminal... bash/fedora15/gnome-terminal is what I am using.
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, there is a problem with the script that does need to be fixed. when you omit the -b option it defaults to "black" background --> this should be fixed to be "no background is specified" instead of specifying a background color always (having a default background color of black would be good for when the user has a black background but would be bad for when the user has a white background).
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, really really good and impressive script IMO.
Aug
29
comment How do you colorize only some keywords for a bash script?
I ran your program and it does what is needed. Huzzah! But unfortunately I am not an awk guru so I find it hard to understand what is going on. Correct me where I am wrong. For each new line awk is run? The for loop in the awk source code is doing: "for all tokens in the line"? then it processes each token?
Aug
28
comment How do you colorize only some keywords for a bash script?
An easy way to test is to make another script that echos text with the keywords "PASS" and "FAIL". That would then be called by this script.
Aug
28
comment How do you colorize only some keywords for a bash script?
I made this community wiki because my solution doesn't work.
Sep
19
comment Where should I put a script that needs to execute once when the user logs in graphically?
FYI, I edited the question to show "gnome 3".
Sep
17
comment Where should I put a script that needs to execute once when the user logs in graphically?
When I do ps -ef | grep gdm I get: root 1117 1 0 15:16 ? 00:00:00 /usr/sbin/gdm-binary -nodaemon root 1142 1117 0 15:16 ? 00:00:00 /usr/libexec/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1 root 1156 1142 0 15:16 tty1 00:00:53 /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for-gdm-8pX5qs/database -nolisten tcp vt1 root 1402 1142 0 15:16 ? 00:00:00 pam: gdm-password (Also echo $DESKTOP_SESSION returns gnome.) Given the output, I think that means default fedora 15 runs gnome display manager.