Search Results

Search: Posts Made By: crimso
1,025
Posted By RudiC
Try also export LSB_MCPU_HOSTS awk 'BEGIN {n...
Try also
export LSB_MCPU_HOSTS
awk 'BEGIN {n = split (ENVIRON["LSB_MCPU_HOSTS"], TMP); TMP[0] = "cp"; print "15", TMP[1]; for (i=0; i<n; i+=2) print TMP[i], TMP[i+1] }'
15 t70c7n120
cp t70c7n120...
1,025
Posted By durden_tyler
Here's my attempt. I would avoid all those...
Here's my attempt.
I would avoid all those pipelines and try to do all transformations in awk or sed or Perl etc.


$
$ echo $LSB_MCPU_HOSTS
t70c7n120 16 t70c7n121 16 t70c7n122 16 t70c7n123 16...
1,679
Posted By Aia
$ printf "%s slots=%s\n" $HOST_LIST t70c7n133...
$ printf "%s slots=%s\n" $HOST_LIST
t70c7n133 slots=16
t70c7n134 slots=16
t70c7n135 slots=16
t70c7n136 slots=16
t70c7n137 slots=16
t70c7n138 slots=16
t70c7n140 slots=16
t70c7n141 slots=16
1,679
Posted By RudiC
sed solution based on you own approach, leaving...
sed solution based on you own approach, leaving out fold:echo $HOST_LIST | sed -r 's/ ([0-9]+)( |$)/ slots=\1\n/g;s/\n$//'
Forum: Linux 03-06-2014
2,138
Posted By port43
I think the reason it is failing is because the...
I think the reason it is failing is because the directory string is enclosed in double quotes in the variable CMD_LINE and it has to do with the way the shell sees this when you try to execute it as...
1,304
Posted By bartus11
Try:NEW_LSB_HOSTS=$(echo "$LSB_HOSTS" | sed...
Try:NEW_LSB_HOSTS=$(echo "$LSB_HOSTS" | sed 's/\(.*\)/[["\1",1]]/;s/ /",1],["/g')
1,395
Posted By gary_w
You might want to read up on the getopts command,...
You might want to read up on the getopts command, which can do argument processing for you in a consistent manner. Here's one sample of many I just found: Illustrated UNIX System V/BSD: Module 59...
1,395
Posted By kalpeer
Hi, Instead of try the below...
Hi,

Instead of

try the below statement.
Thanks,
Kalai
1,725
Posted By Corona688
That might actually have been a better way to do...
That might actually have been a better way to do it.

The reason your first try didn't work because "or" wasn't really what you wanted. You flipped the logic with the !=, which changes the picture...
1,013
Posted By ctsgnb
input=/dir/filename.mph input=${input##*/} ...
input=/dir/filename.mph
input=${input##*/}
output=${input%.*}_solved.mph


$ echo -e "input=$input\noutput=$output"
input=filename.mph
output=filename_solved.mph
1,686
Posted By vgersh99
#!/bin/ksh ...
#!/bin/ksh

valid='4.02.011|4.04.013|4.06.011|5.02.010'

eval "case \$ver in $valid) echo 'do this' ;;
*) echo 'do that' ;;
esac"
Forum: Red Hat 10-24-2011
4,365
Posted By cokedude
[Errno 22] invalid mode ('w') or filename: '//var/lib/yum/rpmdb-indexes/conflicts.tmp'
Can anyone help me with this error?

sudo yum install perl-Gtk2-WebKit
Loaded plugins: langpacks, presto, refresh-packagekit, versionlock
Setting up Install Process
Resolving Dependencies
-->...
Forum: Programming 10-18-2011
6,300
Posted By Corona688
I'm not withholding the answer. I have no more...
I'm not withholding the answer. I have no more information and no means to test with.
4,719
Posted By dude2cool
uniq <filename>
uniq <filename>
1,350
Posted By dude2cool
If you are on Linux, this should work, on other...
If you are on Linux, this should work, on other UNIX flavor's you may have to tweak grep. let me know how it goes and what flavor of NIX did you try.

/opt$ echo "t70cfd139 8 t70cfd144 8 t70cra101...
2,622
Posted By bartus11
Try: awk -F\" -vOFS=\" '{sub(".*\\\\","",$2)}1'...
Try: awk -F\" -vOFS=\" '{sub(".*\\\\","",$2)}1' file
2,123
Posted By radoulov
I would go with something like this: if [...
I would go with something like this:

if [ "$QUEUE" = normal ] && [ "$MEMARC" = SMP ]; then
case $NCPU in
( 2|4 ) HOST_SELECT='-m quadcore' ;;
( 8 ) HOST_SELECT='-m octocore1' ;;...
2,481
Posted By alister
Alternatively, you could use a for loop and ed,...
Alternatively, you could use a for loop and ed, instead of resorting to temp files or gnu extensions:

for f in Export???.dat; do
printf %s\\n '1,$s/Absolute velocity/Pixel shift/g' w q | ed...
1,376
Posted By Franklin52
Maybe something like this? grep -c...
Maybe something like this?
grep -c '^[^$]*DOMAINSOLVER[ \t]*ACMS' file
2,955
Posted By guruprasadpr
Hi 1. Create a file in which you map user-id...
Hi
1. Create a file in which you map user-id with email ids as shown below:

# cat file
12 abc@unix.com
23 xyz@unix.com
54 efg@unix.com
#


2. In the code use this file to get the...
7,466
Posted By alister
for i in 7151:0 7163:2 7170:4 7175:8 7180:16; do ...
for i in 7151:0 7163:2 7170:4 7175:8 7180:16; do
[ $EXECHOST -le ${i%:*} ] && { NCPU=${i#*:}; break; }
done

[ $NCPU == 0 ] && echo "This is a 32B machine, exiting..."

Regards,
Alister
7,466
Posted By dr.house
if [ $EXECHOST -ge 7132 ] && [ $EXECHOST -le 7151...
if [ $EXECHOST -ge 7132 ] && [ $EXECHOST -le 7151 ]
then
echo "This is a 32B machine, exiting..."
elif [ $EXECHOST -ge 7152] && [ $EXECHOST -le 7163 ]
then
NCPU=2
elif [ $EXECHOST -ge 7164...
33,966
Posted By jim mcnamara
# one space in front of it anywhere on the line ...
# one space in front of it anywhere on the line
grep ' package com.att.com;' file
# one or more white spaces
grep '[ \t]*package com.att.com;' file
# at the beginning of the line
grep '^ package...
11,238
Posted By vino
Many ways Within vim :g:^[ ]*$:d Use...
Many ways

Within vim
:g:^[ ]*$:d

Use that regex in sed
sed -e "/^[ ]*$/d" in.txt > out.txt
59,246
Posted By Yogesh Sawant
if you are familiar with regular expressions in...
if you are familiar with regular expressions in perl: perl -pi -e 's#c:/mydocuments/pictures#d:/mypics/personal#g' * modify the regex as per your needs, if required
Showing results 1 to 25 of 25

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