Approaching the end of my portion of some STIG/DOD compliance automation and I was challenged by a co-worker to include a story in my code. There are blocks of code that need to be kept the way they are for GIT/Gerrit and then compliance, but otherwise I changed out all the comments into a not-helpful 300 rendition. I realize the lack of useful comments will make the script a bit harder to manage, and I also realize not everyone will agree with parts of it (Like my hatred for having to take scripts written in bash and then take out the fancy parts so they're portable), but mostly just wanted to share as I was proud of my lack of accomplishment and thought some other folk may get a chuckle out of it.
I kind of drifted a lot and by the end was completely out in the left-field of nonsense. The 300 intro script is way longer than I remembered it being, and I just wanted to get done with this and move on to the next one by the end =]
If other folks have similar things they've nested into scripts, would like to see; if this is too off-topic and gets blasted by a mod as such, my bad m(_ _)m
Hey all,
I'm trying to setup an external XML feed for my site and I've received a script to make it all possible. This script places the feed in the MySQL datbasa and can remove the previous feed. Because I am new to this I would like to ask a simple question. Could somebody tell me where do I... (3 Replies)
I must write a script to change all C++ like comments:
// this is a comment
to this one
/* this is a comment */
How to do it by sed? With file:
#include <cstdio>
using namespace std; //one
// two
int main() {
printf("Example"); // three
}//four
the result should be: (2 Replies)
#!/usr/bin/ksh
ls -l $@ | awk '
/^-/ {
l = 5*log($5)
h = sprintf("%7d %-72s",$5,$8)
print "\x1B
ls command with histogram of file sizes.
The histogram scale is logaritmic, to avoid very short bars for smaller files or very long bars for bigger files.
Screenshot: (4 Replies)
uggc://ra.jvxvcrqvn.bet/jvxv/EBG13
#!/usr/bin/awk -f
BEGIN {
for (n=0;n<26;n++) {
x=sprintf("%c",n+65); y=sprintf("%c",(n+13)%26+65)
r=y; r=tolower(y)
}
}
{
b = ""
for (n=1; x=substr($0,n,1); n++) b = b ((y=r)?y:x)
print b
}
... (0 Replies)
Hi All,
Please let me know how I can put a comment (e.g // or #) to more than 50 lines using vi editor in a .cpp/.sh file.
Thanks in advance. (3 Replies)
I have written a script to start websphere server, I dont know where to put
the file in the OS . please put me the place to put the starup scripts in linux, solaris and AIX? (2 Replies)
This could be a really dumb question, but for a newbie trying to learn, some help would be appreciated. When you write a shell script, what extension should it have, and more importantly, where do you put it???? (7 Replies)