First  |  Prev |  Next  |  Last
Pages: 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
printf "time=%02d:%02d:%02d\n", $hour,$minute,$sec Does NOT work
In a shell script I coded: printf "padded=%02d:%02d:%02d\n", $hour,$minute,$sec With the following values: $hour=0 $minute=7 $sec=26 However when I run the script I get an error: /usr/local/gary/bin/myscript: line 37: printf: 0,7,26: invalid number time=00:00:00 Why? Gary ... 19 Jun 2008 03:26
multiple substitutions with sed
I have a file with lines like these: abc1234|one;two;three xyz3245|two;three def9876|four From a data perspective, this is two fields separated by '|', where the second field contains multiple subitems separated by semicolons. I want to use sed to output this: abc1234|one abc1234|two abc1234|three xy... 19 Jun 2008 04:27
Regular expression for stanza file
I am looking for a regular expression that can identify text from the stanza listed below. Specifically, where the beginning of the line is "root:" and the text "rlogin = false" appears prior to the next time a ":" occurs. I am using a product called BindView control for Unix, and I can not run a general comma... 19 Jun 2008 09:35
Find duplicate files AND ignore .svn folders
Hi there. I'm using this fine script to find all duplicate files in a project: OUTF=rem-duplicates.sh; echo "#! /bin/sh" > $OUTF; find "$@" -type f -print0 | xargs -0 -n1 md5sum | sort --key=1,32 | uniq -w 32 -d --all-repeated=separate | sed -r 's/^[0-9a-f]*( )*//;s/([^a-zA-Z0-9./_-])/\\\1/g;s/(.+)... 19 Jun 2008 01:20
Delete/backspace on command line
Hi all, When running a command line tool such as bc or sqlplus, I can't use the backspace key or the delete key to erase the previously typed character. Backspace gives me ^? and delete gives me [[3~. I know that in bash I can use the 'stty erase' command to set this right but how do I do it in other tools? I so... 19 Jun 2008 07:32
Script Help
Can nyone plz let me know what does the below RC variable setup do.... RC=$? if [ $RC = 0 ]; then ... 19 Jun 2008 01:20
How to awk global replace second field with double quoted string.
Hey gang! I am trying to replace the second field of a file with the string "5AB0". But I need the double quotes to be there too. I am very close, with this command the original file is mmh_bit.out and the new file test.out: gawk '{gsub ($2, "5AB0"); print}' mmh_bit.out > test.out This makes the second field i... 19 Jun 2008 08:33
while loop of c shell <0fffeca1-6683-4272-a393-34774329bd99@c58g2000hsc.googlegroups.com>
On 2008-06-16, Teddy wrote: I am using C shell as interactive shell because its filename completion feature is more easy. I'm curious: what part of C-shell completion is easier than that found in bash? -- Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/> Shell Script... 5 Jul 2008 06:24
[announcement] paexec-0.9.0 released
I've released paexec-0.9.0. http://sourceforge.net/projects/paexec http://freshmeat.net/projects/paexec I post information about it here because I thing it may be important for those who program shell. General information about paexec: Suppose you have a long list of AUTONOMOUS tasks that need to be ... 19 Jun 2008 01:20
trying to recursively get the files' owners and permissions aswell as an md5sum of the data
2008-06-16, 21:32(-04), Albretch Mueller: I also need the full path to the file, the modification times of the files, which find gives you via: ~ sh-3.1# find /ramdisk -type f -printf "%A@ %C@ %T@" ~ I have tried different things using "find" and "ls" and you can always do it in two steps: ... 19 Jun 2008 01:20
First  |  Prev |  Next  |  Last
Pages: 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56