Hi all,
I need some help with sed command. I'm trying to move all the files with a modified date within 12:00 - 13:00.
What i'm doing here is to do is
ls -lt | grep 'Jun 22 12:' > list.txt
to get all file names within that period.
However how do i strip off
-rw-r--r-- 1 enfoot adi... (2 Replies)
Is it possible to process multiple variables in a single sed command?
I have the following ksh with three variables and I want to search for all variables which start with "var" inside input.txt.
I tired "$var$" but it just prints out everyting in input.txt and does not work.
$ more test.ksh... (5 Replies)
Hi,
Could you please explain me the below statement -- phrase wise.
sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt > xyz.txt
if suppose $cnt contains value: 10
it copies last 9 lines of abc.txt to xyz.txt
why it is copying last 9 rather than 10.
and also what is ba and $D over there in... (4 Replies)
Hi all
I am new babie to shell script, so please advise me n help me .
suppose i have a string "abacus sabre", i need to replace occurences 'ab' with 'cd' and i need to store this result into same string and i need to return this result from script to the calling function, where as the string... (4 Replies)
Hello, I need a smart sed command that can take any of the following two as an input and give below mentioned output. As you can see, I am trying to convert some C code
INPUT:
struct abc_sample1 {
char myString;
UINT16 myValue1;
... (2 Replies)
I have a requirement in my project to create report from a template file.
A sample template file is added below:
The report data is stored in a file. A sample data file is added below:
Using the above template and data file I want to create a report like this:
I have tried to... (1 Reply)
Hi,
I am splitting a file based on pattern using sed -f command as below:
sed_cmd2 is the Pattern filename which has the below mentioned pattern in it:
#n
/\(.*\) \(.*\) \(mith\).*/w smith
Input file has following data
1 John Smith Chicago
2 Mary Smith New York
3 Judy... (2 Replies)
I want to execute below command using line number as a variable.
sed '5c\ disk = jskdjfdsk' vm.cfg
How do i substitute a variable in place of 5
for example
i tried substituting
sed '$variablec\ disk = jskdjfdsk' vm.cfg
and
sed '"$variable"c\ disk = jskdjfdsk' vm.cfg)
but they... (2 Replies)
Hi I have a file that contains lines starting with a particular string plus a Colon: I need to output all these lines but only what comes after the colon
Can you pelase assist?
Example of lines in the file:
com.ubs.f35.cashequities/cashequities: 1 2
... (5 Replies)
Discussion started by: mnassiri
5 Replies
LEARN ABOUT SUSE
ipc::sysv
IPC::SysV(3pm) Perl Programmers Reference Guide IPC::SysV(3pm)NAME
IPC::SysV - System V IPC constants and system calls
SYNOPSIS
use IPC::SysV qw(IPC_STAT IPC_PRIVATE);
DESCRIPTION
"IPC::SysV" defines and conditionally exports all the constants defined in your system include files which are needed by the SysV IPC
calls. Common ones include
IPC_CREATE IPC_EXCL IPC_NOWAIT IPC_PRIVATE IPC_RMID IPC_SET IPC_STAT
GETVAL SETVAL GETPID GETNCNT GETZCNT GETALL SETALL
SEM_A SEM_R SEM_UNDO
SHM_RDONLY SHM_RND SHMLBA
and auxiliary ones
S_IRUSR S_IWUSR S_IRWXU
S_IRGRP S_IWGRP S_IRWXG
S_IROTH S_IWOTH S_IRWXO
but your system might have more.
ftok( PATH )
ftok( PATH, ID )
Return a key based on PATH and ID, which can be used as a key for "msgget", "semget" and "shmget". See ftok.
If ID is omitted, it defaults to 1. If a single character is given for ID, the numeric value of that character is used.
shmat( ID, ADDR, FLAG )
Attach the shared memory segment identified by ID to the address space of the calling process. See shmat.
ADDR should be "undef" unless you really know what you're doing.
shmdt( ADDR )
Detach the shared memory segment located at the address specified by ADDR from the address space of the calling process. See shmdt.
memread( ADDR, VAR, POS, SIZE )
Reads SIZE bytes from a memory segment at ADDR starting at position POS. VAR must be a variable that will hold the data read. Returns
true if successful, or false if there is an error. memread() taints the variable.
memwrite( ADDR, STRING, POS, SIZE )
Writes SIZE bytes from STRING to a memory segment at ADDR starting at position POS. If STRING is too long, only SIZE bytes are used; if
STRING is too short, nulls are written to fill out SIZE bytes. Returns true if successful, or false if there is an error.
SEE ALSO
IPC::Msg, IPC::Semaphore, IPC::SharedMem, ftok, shmat, shmdt
AUTHORS
Graham Barr <gbarr@pobox.com>, Jarkko Hietaniemi <jhi@iki.fi>, Marcus Holland-Moritz <mhx@cpan.org>
COPYRIGHT
Version 2.x, Copyright (C) 2007, Marcus Holland-Moritz.
Version 1.x, Copyright (c) 1997, Graham Barr.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.1 2010-04-26 IPC::SysV(3pm)