Store the last 10 strings. A way to make it elegant?
Hello,
Please find an ugly code. bouuu.
It shall work onto RAM only to update from the last 10 strings from $URLTO. I shall read first : "$HOME/.fvwmoscfg/fvwmclipboardmplayerplayurl10.ini"
The code works but it is very ugly. How could it be made elegant please?
Hi all,
I have a script which gets its input from a text file (file.txt) and processes each line within a loop.
I have a counter which increases by one and I want something to happen every 7th, 14th, 21st, etc. line read.
Currently the code looks and works perfectly like this:
... (3 Replies)
Hi All,
Following is the part of my script.It does contain many for loops and is not elegant. Please feel free to suggest any changes to make this elegant.
Thanks!
nua7
for i in `ls $CATALINA_HOME/shared/lib/*.jar`;
do
LOCALCLASSPATH="$LOCALCLASSPATH:$i"
done
for i in... (3 Replies)
I am faced with a situation where I have directories of gunzipped contents bundled into a tar file. It might look something like this.
x coop/batch/bin/ha90x20.gz, 632641 bytes, 1236 tape blocks
x coop/batch/icm/HA90X20.icm.gz, 1821 bytes, 4 tape blocks
x coop/batch/aeenv.gz, 4117 bytes, 9 tape... (2 Replies)
Hey all,
This is my first post, and I am relatively new to linux/unix scripts. I am writing a bash script in which I am trying to extract one line from another file and parse specific words from the line into an array. So for example, I have a file called SortScans in which the first 5 lines... (9 Replies)
I want to create an array which can store the strings from the user input in shell script .
example :-
I want to store the 5 fruits name in a single array which the user provides . (1 Reply)
Hi,
I am wanting to test that an argument passed is one of tstt11/2/3, tstq11/2/3 or tstp11/2/3 and I am currently doing it as below.
Just wanting to know if there is a more 'elegant' way of doing this :-)
arg_inst=`echo $1 | awk '{ print tolower($1) }'`
if ] then
echo "-... (2 Replies)
Discussion started by: newbie_01
2 Replies
LEARN ABOUT DEBIAN
surfraw-update-path
SURFRAW-UPDATE-PATH(1) User Contributed Perl Documentation SURFRAW-UPDATE-PATH(1)NAME
surfraw-update-path - updates PATH in shell config files
SYNOPSIS
surfraw-update-path [-add] [-remove] [-check] [-sys] [-all] [-help] [-shell=SHELL]
DESCRIPTION
surfraw-update-path adds the surfraw elvi directory (/usr/lib/surfraw) to your PATH in your shell's config file.
Currently it supports bash, sh, csh, tcsh, ash, dash, ksh, pdksh, zsh, rc, and es
Don't forget to login again or source your login files for it to take effect.
OPTIONS -check
Checks to see if the surfraw config code is present. This is the default.
-add
Adds the surfraw config code.
-remove
Removes the surfraw config code
-sys
Updates the system-wide shell config instead of the user. Must be done as root.
-shell=SHELL
Selects the shell to configure. Defaults to the value of the $SHELL environment variable.
Currently supported shells are:
sh, ash, bash, dash, csh, tcsh, ksh, pdksh, zsh, rc, and es.
-all
Attempts to configure the startup files for all known shells
-help
Gives a usage message
RETURN VALUE -check returns 0 if the surfraw code is present in the file, 1 if it is not found, or 2 on error.
All other options return 0 on success, or 2 on error.
ENVIRONMENT
SHELL
Used to determine which shell to configure, if -shell is not given.
HOME
Used to find users config files.
ENV Used by posix-compliant shells to specify a startup rc file.
ZDOTDIR
Used to find user config files for zsh. If not set, defaults to HOME.
SEE ALSO surfraw(1), sh(1), ash(1), bash(1), dash(1), csh(1), tcsh(1), ksh(1), pdksh(1), zsh(1), rc(1), es(1)AUTHOR
Ian Beckwith <ianb@erislabs.net>
perl v5.12.4 2011-07-12 SURFRAW-UPDATE-PATH(1)