Hello simple question :
how can i split the $PATH by the ":" seperator with one liner ?
mybe using awk is there any builtin function in awk that splits and prints the output ?
thanks (2 Replies)
Hi,
I have file: data.log.1
### s1
main.build.3495
main.build.199
main.build.3408
###s2
main.build.3495
main.build.3408
main.build.199
I want to read this file and store in two arrays in Perl.
I have following command, which is working fine on command prompt.
perl -n -e... (1 Reply)
Dear Forum
I'm Trying to use split function to split a string, but the output is not as the same order as of the string, please see simple example
echo " " | nawk -v var="First;Second;Third;Fourth" '
BEGIN {split(var, arr,";") for(i in arr){print arr }}'
The output is
Second
Third... (6 Replies)
hi,
while i am placing the command.
ls /app/callidus/rci_vst_p1/vst_fact_sms_cdr*
I am getting the below ouput..
Output
/app/callidus/rci_vst_p1/Inbound/vst_fact_sms_cdr_20101124.dat
/app/callidus/rci_vst_p1/Inbound/vst_fact_sms_cdr_20101215.dat... (4 Replies)
Hello,
I have the string "/a/b/c/ddd.txt" and i want to get only the filename, in this case "ddd.txt". I have as something known in the script the pattern "/a/b/c/", so I`ve tried something like:
echo "/a/b/c/ddd.txt" | cut -d "/a/b/c/" -f2
but it doesn`t go, any help?.
thanks,
bye (2 Replies)
Hello,
I would like to split a file but I dont what the subfiles to be named the way they are:
ex:
default name: xaa xab xac xad xae
desired name: b01 b02 b03 b04 b05
I know I can rename them afterwards however I have a varialbe split lenghth, in other words I am not sure how... (2 Replies)
Hi,
How to set as variable from sql output.
Query:
select aa.serial, ao.name from ann_amit aa JOIN ann_object ao on (aa.classid=ao.classid);
I got two values from aa.serial and ao.name, I wanna make two different variable for aa.serial and ao.name.
The value of aa.serial should be in... (2 Replies)
Hello,
I'm using Windows 7 ; sed, awk and gnuwin32 are installed.
I have a big text file I need to manipulate.
In short, I will have to split it in thousands of short files, then rename and save in a folder which name is based upon filename.
Here is a snippet of my big input.txt file (this... (4 Replies)
Dear All,
I would like to extract the file name without extension form a variable...
In particular I have a command like this one:
for file in path/to/file/example_number.ext
do something -input $file -output ${file%_number.ext}.new
done
means that in variable $file are saved all the path... (3 Replies)
Hello All,
May i please know how do i ensure my split command would NOT generate incomplete output files like below, the last lines in each file is missing some columns or last line is complete.
split -b 50GB File File_
File_aa
|551|70210203|xxxxxxx|12/22/2010 20:44:58|11/01/2010... (1 Reply)
Discussion started by: Ariean
1 Replies
LEARN ABOUT MOJAVE
ipc::sysv5.18
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-2010, 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.18.2 2014-01-06 IPC::SysV(3pm)