1
votes
0
comments
5,396
views

Important scripts useful for a Linux system administrator

1 vote, 1.00 avg. rating (20% score)
I am a Linux system administrator and constantly find myself doing the same chores again and again. I need some scripts to make life easier. What are the most important scripts needed by a Linux system administrator? Ramesh While all the scripts provided below may be accurate, there may be much more advanced features available. […]
0
votes
0
comments
3,266
views

Script to login to ssh twice

0 votes, 0.00 avg. rating (0% score)
I need to login through ssh twice with a script and can’t get it to work. This is what I have in my script file: but this fails with the error: user@host:~$ ssh: Could not resolve hostname address2: Name or service not known send: spawn id exp7 not open while executing "send "$pwr"" If I […]
0
votes
0
comments
4,768
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,081
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
767
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 […]