Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try just one of the above, that doesn't work, either.
To me, this looks like it should be pretty basic, but I am new to command line and am probably doing something wrong. Or, I'm told there are differences between Mac Linux and other PC Linux.
I'd rather it be me making the mistake, than different flavors of Linux.
Any help appreciated.
Moderator's Comments:
edit by bakunin: Please use CODE-tags for code, data and terminal output. Thank you.
Hi,
I have written a c program to find cos() of a value , its not working, I am getting value of "val " as 0000.
#include<stdio.h>
#include<math.h>
main()
{
float val;
val = cosf( 1.570796);
printf("\nval = %f",val);
} (9 Replies)
I'm trying to replace space with inderscore on Mac OS X 10.6.3
sed -i 's/ /_/g' somefile
sed: 1: "hsa_mirbase.fa": extra characters at the end of h command
This works perfectly fine on Linux.
Thank you
Joseph Dhahbi (3 Replies)
Hi,
My code uses try_eval block to do some code execution. This piece of code does not work on RHEL 5.4. The program just hangs at the try_eval block and does not throw any errors either. The same program however works in other Linux boxes that we have.
I have written a simple program that... (0 Replies)
Hi
I tried running the code
scrname=`whence $0 | sed -e 's/\.\///g'`
where $0 is substituted by cm_dsjobrun.sh
in unix env then the value it returns me is
SCRNAME=/data/ds/dpr_ebicm_uat/etl/cm3_0/scripts/shell/cm_dsjobrun.sh
whereas i ran the same code on linux env
The value... (9 Replies)
Hi All
I have fired a command in linux
table=`echo ${file_name} | awk '{FS="/"; print $NF}' | awk '{FS="."; print $1}'`
where file_name has
/data/ds/dpr_ebicm_uat/backfill/temp/etl_app_info.csv
/data/ds/dpr_ebicm_uat/backfill/temp/etl_app_jobs.csv ... (10 Replies)
I ran one the script in debug mode in linux and have a problem
ret='$prmAttunityUser=ais'
Now i need to remove $ from this '$prmAttunityUser=ais' so i had added a sed command like this sed 's/$//g' but its not working could you all please help me with an alternate command
I want the output... (3 Replies)
I am using Linux RHEL5 64 bit and installed oracle 11g.
I want to check ODBC connection , i had modified odbc.ini file
when i use this command -isql
I am getting following error .
bash: isql: command not found
Kindly help (5 Replies)
Hi
I am working on linux machine and swap command is not working Linux Machine
On Solaris machine it is working fine:
uname -a
SunOS rgsm01 5.9 Generic_118558-03 sun4u sparc SUNW,Sun-Fire-V440
swap -s
total: 6596320k bytes allocated + 1035968k reserved = 7632288k used, 38893408k available
... (5 Replies)
I have a script .sh with a curl command in it:
curl --digest "http://xxxxxxx.xxx/mail.php?email=xxxx@xxx.xx";
from terminal this works good :
./script.sh //(mail arrives in my box)
from php this works good:
shell_exec('./phpsc.sh'); // (mail arrives in my box)
from terminal this... (13 Replies)
Hi All,
How can i run a single command on multiple servers with or without giving credentials.
I have a file(servers.txt) which has got list of servers and i want to run a command lsb_release -dr on all these servers and get output of those servers against each server.
I tried below code... (9 Replies)