Search Results

Search: Posts Made By: mattiasvdm
Forum: OS X (Apple) 03-04-2013
9,023
Posted By mattiasvdm
Thanks but I can't get it to work within my code....
Thanks but I can't get it to work within my code. My code looks like this:
sed -ie '/#End/i\
'"${command//$'\n'/\\$'\n'}"'\
' /location/of/somescript.sh
Forum: OS X (Apple) 03-04-2013
9,023
Posted By mattiasvdm
Up! All I need is one extra line... :)
Up!

All I need is one extra line... :)
Forum: OS X (Apple) 02-25-2013
9,023
Posted By mattiasvdm
Still don't know exactly HOW it works (would like...
Still don't know exactly HOW it works (would like to), but it works fine! I found out that I can add as many lines to the variable as I want. It will insert all. :)

One last question:

At some...
Forum: OS X (Apple) 02-21-2013
9,023
Posted By mattiasvdm
bash And it works! Can you please explain...
bash

And it works! Can you please explain how it works because you lost me at the \\//\\ signs... :D
Forum: OS X (Apple) 02-21-2013
9,023
Posted By mattiasvdm
Thanks guys, I get the point. :b: Next...
Thanks guys,

I get the point. :b:

Next challenge:

The variable is a multi-line variable:
read -d '' command <<EOF
command3a
command3b
command3c
EOF

Now if I run:
sed -ie '/#End/i\...
Forum: OS X (Apple) 02-20-2013
9,023
Posted By mattiasvdm
Using variable in sed
Hi all,

Somescript.sh looks like this:

#!/bin/sh
# somecript.sh

somecommand1

somecommand2

#End

exit


Now I want to add somecommand3 to somescript.sh above #End

I now how to...
Forum: OS X (Apple) 01-03-2013
2,395
Posted By mattiasvdm
Thanks, that comes in handy! But the results only...
Thanks, that comes in handy! But the results only show what I already knew. But I got a little further. I thought maybe it just needs more time. So I put 40 seconds after the installer command and...
Forum: OS X (Apple) 01-02-2013
2,395
Posted By mattiasvdm
Well I'm pretty new to unix scripting so FSEvents...
Well I'm pretty new to unix scripting so FSEvents doesn't directly ring a bell. I've searched it and I think I understand what is does. But I don't really see the connection to my problem.
Is it...
Forum: OS X (Apple) 12-27-2012
2,395
Posted By mattiasvdm
Sorry, forgot to mention. Yes, it's for Mac OS X...
Sorry, forgot to mention. Yes, it's for Mac OS X 10.8.
Forum: OS X (Apple) 12-27-2012
2,395
Posted By mattiasvdm
UNIX cache problem?
So I worked out a script for Mac OSX from an existing script. This script checks the versionnumber of a plugin and a package. If the plugin version is different from the package it has to update the...
3,072
Posted By mattiasvdm
Awk doesn't seem to work either. If I use: awk...
Awk doesn't seem to work either. If I use:
awk -F\| '$1!="Computername2"' file.csv >> file2.csv
File2 is the same as file1. If I output to the terminal window it output's everything in one single...
3,072
Posted By mattiasvdm
Thanks for your reply. The first error I got...
Thanks for your reply.

The first error I got is:

Missing right curly or square bracket at -e line 1, at end of line
syntax error at -e line 1, at EOF
Execution of -e aborted due to...
3,072
Posted By mattiasvdm
Grep output problem
Hi all,

Here is my problem:

I'm testing a login script for our mac Machines. This script output's in a csv file.

The login script looks like this:

echo...
Showing results 1 to 13 of 13

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