Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
gnu . bash
This is a Usenet group - learn more
Find or start a Google Group about bash.
Group info
Language: English
Group categories: Not categorized
More group info »
Discussions
View:  Topic list, Topic summary Topics 1 - 10 of 786  Older »

A bash function to expand tildes in a filename? (and also works in zsh and ksh 93u+) 
  I would like to write a shell function that takes a string and sets variable $filename a string that expands filename tildes in the string (e.g. ~ or ~rocky) the same as bash would do. If the string has embedded blanks, those blanks should be preserved in the string. Unix, OSX, Windows all allow blanks in filenames and directories.... more »
By Rocky Bernstein  - Apr 3 - 1 new of 1 message    

odd egrep behavior 
  I am trying to extract a string from the output of a DICOM directory parser. The string I'm trying to match looks similar to this: (0004,1500) CS #36 [DICOM\ST000000\SE000000\CR000 000.DCM] Referenced File ID "s" is a much larger string in which the target string is embedded. From the console, this string matches:... more »
By MarkA  - Mar 14 - 3 new of 3 messages    

awk printf inside xargs 
  hi i'm trying to run multi-core bash script with xargs with an awk command inside. for dir in UA_tile_txt $(for n in `seq 1 41` 50 ; do echo UA_buf$n"_tile_txt" ; done ) ; do echo $dir ; done | xargs -n 1 -P 16 bash -c $' dir="$1" IN_UA=/weldgfs/p51/gius_urban/ pop_urban/buffer_tif... more »
By giuseppe.amatu...@gmail.com  - Jan 7 - 2 new of 2 messages    

combine xargs and eof 
  Hi i'm using often xargs to run process in parallel ls *.txt | xargs -n 1 -P 10 bash myscript.sh where myscript.sh is (for examples of course is longer): echo $1 i would like to perform the same operation using the EOF syntax and import the arguments inside the eof I tried ls *.txt | xargs -n 1 -P 10 <<... more »
By giuseppe.amatu...@gmail.com  - Oct 17 2012 - 1 new of 1 message    

NL in Heredoc 
  Is there a way to expand new lines in heredocs? In the script below "echo $all" prints: put File1 put File2 ... however $all in the heredoc DATA expands to put FILE1\nput FILE2\nput ... ... FILE_LIST=" File1 File2 File3 File4 File5 " nl="\n" for each in $FILE_LIST do all=$all"put "$each${nl}... more »
By Greg Martin  - Oct 4 2012 - 3 new of 3 messages    

time zone 1 hr east of 
  For a script I need to create file names with date embedded in them, and since a lot of the files arrive (the box is in CDT) after midnight EDT but just prior to it in CDT, I issue this at the top of the script: export TZ=America/New_York ... and get file names created for what (to CDT) would be the next... more »
By The Derfer  - Jul 31 2012 - 2 new of 2 messages    

How can I set up an alias, function or variable as a shortcut to "2>&1 | tee build.log"? 
  As the subject line says, I'd like a quicker way to type "2>&1 | tee build.log" Or even better, I'd like a shortcut which did expanded to 2>&1 | tee $1.$2.log" where $1 and $2 are taken from the current line. I've tried a few different things and here are the problems I found 1. Aliases seem to apply to first words (or first word after another alias) only. So I'm pretty sure they can't help.... more »
By Carter Sanders  - Jul 23 2012 - 1 new of 1 message    

Detect USB device and upload files via ssh 
  Hi, I need to create a script that detects a device when connected via USB and uploads a few files using ssh. Anyone has the guidelines in how to implement that?
By Albert Tresens  - Jun 21 2012 - 1 new of 1 message    

bash shell script question (what's wrong in this script?) 
  This is a script I wrote in Oracle Enterprise Linux 5. This script yields the errors that follow: ...CWD=/directory cd $CWD for filename in `ls *.zip` do s=$(ls -lah $filename | awk '{ print $5}'); if [ $s -eq 0 ] ; then echo "File $filename has zero file size in $CWD" | mailx -s " ERROR:... more »
By The Derfer  - May 14 2012 - 5 new of 5 messages    

Argument "-o nospace" of compgen isn't work? 
  Is argument "-o nospace" of compgen not work? I write a simple script for auto-completion as following, ------------- _cooltool() { local cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(compgen -o nospace -W "fooOption barOption" -- $cur) )... more »
By yhung...@gmail.com  - May 8 2012 - 1 new of 1 message    

1 - 10 of 786   « Newer | Older »

XML