Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue Post 303027554 by RudiC on Tuesday 18th of December 2018 09:41:22 AM
Old 12-18-2018
On top of what bakunin already said, it would be helpful to see a (or maybe even several) small sample input files with or without "ACROSS" in different positions, and the results (output / error msgs) of your scripts applied to them.
Where and how are your files generated? What are the line terminators?

Last edited by RudiC; 12-18-2018 at 11:13 AM..
 

10 More Discussions You Might Find Interesting

1. Programming

cos() command not working in Linux

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)
Discussion started by: shashi
9 Replies

2. Emergency UNIX and Linux Support

sed on Mac OS versus Linux

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)
Discussion started by: jdhahbi
3 Replies

3. Shell Programming and Scripting

ITcl :: try_eval command not working in Linux 5.4

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)
Discussion started by: archana485
0 Replies

4. Shell Programming and Scripting

sed command working different in linux environment.

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)
Discussion started by: vee_789
9 Replies

5. Shell Programming and Scripting

AWK command working different in Linux

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)
Discussion started by: vee_789
10 Replies

6. Shell Programming and Scripting

Sed command issue in linux

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)
Discussion started by: vee_789
3 Replies

7. Red Hat

isql command not working in Linux 64bit

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)
Discussion started by: roopalidalvi231
5 Replies

8. UNIX for Dummies Questions & Answers

SWAP command not working on Linux machine

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)
Discussion started by: Basant Mishra
5 Replies

9. Shell Programming and Scripting

At command for Linux job not working from php

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)
Discussion started by: extra93
13 Replies

10. Shell Programming and Scripting

How to run simple single command on multiple Linux servers?

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)
Discussion started by: darling
9 Replies
MSGS(1) 						      General Commands Manual							   MSGS(1)

NAME
msgs - system messages and junk mail program SYNOPSIS
msgs [ -fhlpq ] [ number ] [ -number ] msgs -s msgs -c [ -days ] DESCRIPTION
Msgs is used to read system messages. These messages are sent by mailing to the login `msgs' and should be short pieces of information which are suitable to be read once by most users of the system. Msgs is normally invoked each time you login, by placing it in the file .login (.profile if you use /bin/sh). It will then prompt you with the source and subject of each new message. If there is no subject line, the first few non-blank lines of the message will be displayed. If there is more to the message, you will be told how long it is and asked whether you wish to see the rest of the message. The possible responses are: y type the rest of the message. RETURN synonym for y. n skip this message and go on to the next message. - redisplay the last message. q drops you out of msgs; the next time you run the program it will pick up where you left off. s append the current message to the file ``Messages'' in the current directory; `s-' will save the previously displayed message. A `s' or `s-' may be followed by a space and a file name to receive the message replacing the default ``Messages''. m or `m-' causes a copy of the specified message to be placed in a temporary mailbox and mail(1) to be invoked on that mailbox. Both `m' and `s' accept a numeric argument in place of the `-'. Msgs keeps track of the next message you will see by a number in the file .msgsrc in your home directory. In the directory /usr/msgs it keeps a set of files whose names are the (sequential) numbers of the messages they represent. The file /usr/msgs/bounds shows the low and high number of the messages in the directory so that msgs can quickly determine if there are no messages for you. If the contents of bounds is incorrect it can be fixed by removing it; msgs will make a new bounds file the next time it is run. The -s option is used for setting up the posting of messages. The line msgs: "| /usr/ucb/msgs -s" should be include in /etc/aliases to enable posting of messages. The -c option is used for performing cleanup on /usr/msgs. An entry with the -c option should be placed in /etc/crontab to run every night. This will remove all messages over 21 days old. A different expiration may be specified on the command line to override the default. Options when reading messages include: -f which causes it not to say ``No new messages.''. This is useful in your .login file since this is often the case here. -q Queries whether there are messages, printing ``There are new messages.'' if there are. The command ``msgs -q'' is often used in login scripts. -h causes msgs to print the first part of messages only. -l option causes only locally originated messages to be reported. num A message number can be given on the command line, causing msgs to start at the specified message rather than at the next message indicated by your .msgsrc file. Thus msgs -h 1 prints the first part of all messages. -number will cause msgs to start number messages back from the one indicated by your .msgsrc file, useful for reviews of recent messages. -p causes long messages to be piped through more(1). Within msgs you can also go to any specific message by typing its number when msgs requests input as to what to do. FILES
/usr/msgs/* database ~/.msgsrc number of next message to be presented AUTHORS
William Joy David Wasley SEE ALSO
aliases(5), crontab(5), mail(1), more(1) BUGS
4th Berkeley Distribution October 22, 1996 MSGS(1)
All times are GMT -4. The time now is 06:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy