Search Results

Search: Posts Made By: xbin
Forum: OS X (Apple) 05-18-2017
3,247
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
4,218
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 \)
1,410
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
1,221
Posted By xbin
Enclose the variable in strong and weak quotes. ...
Enclose the variable in strong and weak quotes.

sed '/'"$DB_Name"'\;/d' FILE
11,424
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: Programming 04-03-2015
1,877
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
Forum: Open Source 03-28-2015
12,395
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...
3,765
Posted By xbin
Try the following-> sed '/.*_id...
Try the following->

sed '/.*_id .*/s/double/string/' FILE
51,685
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
2,645
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
16,460
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.* >...
3,129
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
12,875
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
17,716
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.
1,168
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\}' .
3,312
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
4,398
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...
2,597
Posted By xbin
Try using the -f option if [ -f "$to"...
Try using the -f option

if [ -f "$to" ]
6,385
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...
9,886
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...
1,067
Posted By xbin
set +o history
set +o history
174,334
Posted By xbin
foreach x ( * ) echo $x end or ...
foreach x ( * )
echo $x
end

or

foreach x ( `ls` )
echo $x
end
2,380
Posted By xbin
find "$PWD" -type d -name...
find "$PWD" -type d -name "${PWD##*/}"
5,046
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
3,631
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
Showing results 1 to 25 of 30

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