0
votes
0
comments
1,919
views

Why use Chef/Puppet over shell scripts?

0 votes, 0.00 avg. rating (0% score)
New to Puppet and Chef tools. Seems like the job that they are doing can be done with shell scripting. Maybe it was done in shell scripts until these came along. I would agree they are more readable. But, are there any other advantages over shell scripts besides just being readable? Totor A domain-specific language […]
0
votes
0
comments
2,026
views

What is the difference between Terminal, Console, Shell, and Command Line?

0 votes, 0.00 avg. rating (0% score)
What is the difference between Terminal, Console, Shell, and Command Line? Vi. The short answer is that terminal = text input/output environment console = physical terminal shell = command line interpreter Console and terminal are closely related. Originally, they meant a piece of equipment through which you could interact with a computer: in the early […]
0
votes
0
comments
1,788
views

Deleting files with special characters

0 votes, 0.00 avg. rating (0% score)
I have a folder named akorg✽. That Unicode character causes headaches for me when software makes incorrect assumptions about the text encoding of my file paths, so I’d like to remove it from the name. The problem You’d think this would be easy: $ mv akorg✽ akorg mv: cannot move ‘akorg✽’ to a subdirectory of […]
0
votes
1
comments
77,387
views

Using awk to print all columns from the nth to the last

0 votes, 0.00 avg. rating (0% score)
Getting a one-liner awk routine to print the nth field to the last should not be so complicated. For my wish list awk should have a function called ‘fields’ that would perform this tasks. It could have the same syntax as the substr command ie fields(5, 8) which would print fields 5 through 8. Being […]
0
votes
0
comments
5,290
views

Welters Helpful Unix Administrative Scripts

0 votes, 0.00 avg. rating (0% score)
Over the years I have used many scripts to perform various tasks. Some of those scripts came from the-welters website. Here you will find some great perl scripts to perform such tasks like display Cisco CDP packets to performing symaccess commands on EMC storage arrays. These scripts are distributed under standard GNU Public License terms. […]
0
votes
0
comments
4,786
views

find and remove duplicates in a directory

0 votes, 0.00 avg. rating (0% score)
I have a directory with multiple img files and some of them are identical but they all have different names. I need to remove duplicates but with no external tools only with a bash script. I’m a beginner in Linux. I tried nested for loop to compare md5 sums and depending on the result remove […]
0
votes
0
comments
1,378
views

Avoiding Nagios commands.cfg

0 votes, 0.00 avg. rating (0% score)
Nagios comes with a set of pre-installed check commands. They are installed at /usr/libexec/nagios or /usr/local/nagios/libexec (anyway, the $USER1$ is expanded to the right place) In that folder you can find several check_whatever commands, most of them are binary files, some are shell or perl scripts. If there is not a suitable check program to […]
0
votes
0
comments
1,093
views

Bash vs ksh pipes

0 votes, 0.00 avg. rating (0% score)
I am stuck with some problems with my scripts in ksh. FWIW the problem which I am unable to overcome is that when I use a structure such as this command | while read VAR1 do many.commands using $VAR1 done I often get that my scripts do not perform the loop for every line piped […]
0
votes
0
comments
779
views

Need to improve urlencode function

0 votes, 0.00 avg. rating (0% score)
I need a way to URL encode strings with a shell script on a OpenWRT device running old version of busybox. Right now I ended up with the following code: This works more or less fine but there’re a few flaws: Some characters are skipped, like “”, for example. Result is return character by character […]
0
votes
0
comments
2,759
views

Oneliners: Removing blank lines from a unix file

0 votes, 0.00 avg. rating (0% score)
Many of times I receive comma delimited files an they have blank lines after each record. I would like to use sed or awk. I need to remove all the blank lines from an input file and write into an output file.