Search Results

Search: Posts Made By: xbin
Forum: OS X (Apple) 05-18-2017
1,293
Posted By xbin
This will place the window of the new instance of...
This will place the window of the new instance of the Terminal.app in front.

open -F -n -b com.apple.Terminal
Forum: OS X (Apple) 11-11-2016
2,941
Posted By xbin
Just exclude the .Trash directory in your find...
Just exclude the .Trash directory in your find statement.

find "$HOME" -path '*.Trash*' -prune -o \( -name sox -print \)
792
Posted By xbin
Use ed: for file in *.txt do ...
Use ed:


for file in *.txt
do
printf "%s\n" 1i "geneID $file" . w | ed -s "$file"
done
860
Posted By xbin
Enclose the variable in strong and weak quotes. ...
Enclose the variable in strong and weak quotes.

sed '/'"$DB_Name"'\;/d' FILE
Forum: Programming 04-03-2015
1,188
Posted By xbin
If I understand your question correctly then a...
If I understand your question correctly then a good starting point would be

man hier
6,359
Posted By xbin
A variation of RudiC's solution that should work...
A variation of RudiC's solution that should work in OS X. If your file names have spaces in the name then

awk 'FNR==3 && /[a-z]*-[a-z]*-[a-z]*-/ {printf"%s\n", FILENAME}' file* | xargs -I {} echo...
Forum: Open Source 03-28-2015
7,538
Posted By xbin
You should read the INSTALL and README files...
You should read the INSTALL and README files before you attempt to compile open source software. You are missing the dependency lib.ICE- configure: error: Can't find libICE because configure cannot...
1,613
Posted By xbin
Try the following-> sed '/.*_id...
Try the following->

sed '/.*_id .*/s/double/string/' FILE
15,618
Posted By xbin
You somewhat "jump through hoops" with csh. The...
You somewhat "jump through hoops" with csh. The following should work (tested in tcsh).

set v=`cat file`
set i=1
while ( $i < = $#v )
echo $v[$i]
@ i = $i + 1
end
Forum: OS X (Apple) 12-14-2014
1,968
Posted By xbin
man stat and man strftime for more details. ...
man stat and man strftime for more details.

stat -f "%Sm" -t "%Y%m%d%H%M.%S" FILE
7,502
Posted By xbin
The shell will match all files that begin with...
The shell will match all files that begin with XX.YYYY..ZZZ.2014.001. using "*", cat will concatenate the matching files, then redirect the output ">" to a file.

cat XX.YYYY..ZZZ.2014.001.* >...
2,033
Posted By xbin
May be something like this: grep -ci word *...
May be something like this:

grep -ci word * | while read line; do
if [ ${line#*:} -gt 0 ]; then
printf "%s\n" "$line"
fi
done
6,270
Posted By xbin
sed -n '/string/h;${x;p;}' file Hold the...
sed -n '/string/h;${x;p;}' file

Hold the last occurrence of the pattern "string"; put "string" into the pattern and print.
7,423
Posted By xbin
You can read all about it here- Regular...
You can read all about it here- Regular expression - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Regular_expression)

sed 's/^[[:blank:]]*//' file.xml
679
Posted By xbin
There are many ways to approach this, with GNU...
There are many ways to approach this, with GNU grep you could try this->

grep -orsh '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' .
2,385
Posted By xbin
If you do not declare a PATH variable in your...
If you do not declare a PATH variable in your script or crontab then the PATH will be

/usr/bin:/bin

hdiutil manipulates disk images. It will unmount attached file systems but you should be...
Forum: OS X (Apple) 10-05-2012
3,449
Posted By xbin
at is disabled in OS X. You can enable at with...
at is disabled in OS X. You can enable at with the following command ->

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist

and disable at with ->

sudo launchctl...
1,712
Posted By xbin
Try using the -f option if [ -f "$to"...
Try using the -f option

if [ -f "$to" ]
2,813
Posted By xbin
You are missing multiple binary files in...
You are missing multiple binary files in /usr/bin/. I would back up your user data and your fink installation. If you have compiled anything in /usr/local/ then backup /usr/local/. Run fsck_hfs like...
4,137
Posted By xbin
#This is an array in csh set files = (`ls`) ...
#This is an array in csh
set files = (`ls`)

#The number of elements in the array files
echo $#files

#element 4 in the array files
echo $files[4]

#elements 1 though 3 of the array files...
724
Posted By xbin
set +o history
set +o history
131,315
Posted By xbin
foreach x ( * ) echo $x end or ...
foreach x ( * )
echo $x
end

or

foreach x ( `ls` )
echo $x
end
1,896
Posted By xbin
find "$PWD" -type d -name...
find "$PWD" -type d -name "${PWD##*/}"
2,704
Posted By xbin
/home/unix/jones unix is the parent...
/home/unix/jones

unix is the parent directory of jones
home is the parent directory of unix
the root directory is the parent directory of home
4,367
Posted By xbin
You can start with naming the mounts correctly-> ...
You can start with naming the mounts correctly->

/Volumes/NO\ NAME\ 1/

Your script should check that the flash drives are mounted before it proceeds. You can parse the info from->

mount
Showing results 1 to 25 of 30

 
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy