how to include a text pattern in system function in PERL
Pleeeeease help..
I'm working in perl
i have a system function to check whether a file is readable for others or not.
i just want to print a text in that command
my command is :
i know for displaying text in awk command one needs to put it in double quotes "" but here how to do that.. when we are executing awk in system command (which already has double quotes in the start and end)
Moderator's Comments:
Please use code tags next time for your code and data. You already got a PM for that for your last posts, do not ignore that. Else you will start collecting infraction points.
Last edited by zaxxon; 08-23-2012 at 04:17 AM..
Reason: code tags
hello All,
I need to invoke by perl script some program/command and monitor it for 5
minutes . In case it still running for more then 5 min I need to send a signal which will stop it.
I implemeted this as shown below by using eval & alarm
and I'd like to know if there is a better way to... (1 Reply)
Hi,
I have a sql file that runs something like this
vi Test.sql
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM PUBLIC;
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM DEMO_READ;
REVOKE SELECT ON DEMO_USER.DEMO_NOMINEE_TEST FROM DEMO_READ;
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM... (3 Replies)
Hi,
I have a script that checks the length of each record/line in file - This seems to be working when there are no special systems character that are invisible or hidden.
awk -v file=$file '{
if (filename==file)
{ k+=$5
if (length() <= 10 ){print size length(), "bytes " k}
}... (2 Replies)
Hello,
I was using a shell script for sending contents of a text file(email.report) to different users.
I was using the below command in my script to send email...
cat email.report | /usr/bin/mailx -s $REQ_SUBJECT -h 5 abc@xyz.com
It was working fine all these days but now all of a sudden it... (18 Replies)
Hi,
I'm trying to remove rows that including specific word, but the below is replacing only the first occurrence, how to do this for the all occurrences within the file.
grep -v "mdsMVLink\|mdsMVMembership\|mdsMVLinkType" sfile.txt > dfile.txt
Could someone help me how to accomplish this?
... (2 Replies)
Hello,
I'm using Ubuntu Netbook Edition on my family's 4 netbooks. Sadly (and a big mistake in my opinion?), I can't add a temp monitoring applet to my panel, but that's not really the point. I am needing a way to monitor my computer temps that includes a graph (kinda like a CPU usage ... (0 Replies)
Hi
I am trying to filter some data using awk. I have a statement-
awk 'BEGIN { FS = "\n" ; RS = "" } { if ( $6 = "City: " ) { print "City: Unknown" } else { print $6 } }'`
The $6 values are
City: London
City: Madrid
City:
City: Tokyo
This expression seems to catch all the lines... (4 Replies)
I have the following script that greps lines containing "AT" from data files data1.hsq through data1000.hsq, then cuts their second column and puts in data files called perm1 through perm1000.
I want to modify the script so that instead of putting the data in separate data files perm1 through... (2 Replies)
Hi
I've to remove the files which has the following file pattern in path /home/etc/logs
fnm_HST_date1
fnm_hst_date1
fnm_HST_date2
I've used the following code to to remove the files having file names like "HST" .
#!/usr/bin/ksh
set -x
file_path=/home/etc/logs
file_nm=HST
find... (2 Replies)
Hi,
I have two files:
File1:
sample statements1
<UID = " " PWD = " ">
sample statements2
File2:
UID ="admin"
PWD ="password" (6 Replies)
Discussion started by: manid
6 Replies
LEARN ABOUT MOJAVE
platform::shell
platform::shell(n) Tcl Bundled Packages platform::shell(n)
__________________________________________________________________________________________________________________________________________________NAME
platform::shell - System identification support code and utilities
SYNOPSIS
package require platform::shell ?1.1.4?
platform::shell::generic shell
platform::shell::identify shell
platform::shell::platform shell
_________________________________________________________________DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell.
This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only
requirement is that the other shell (identified by its path), is actually executable on the current machine.
While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell
this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run
32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers.
For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed
packages, versus the architecture of the shell running the repository software.
COMMANDS
platform::shell::identify shell
This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell.
platform::shell::generic shell
This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell.
platform::shell::platform shell
This command returns the contents of tcl_platform(platform) for the specified Tcl shell.
KEYWORDS
operating system, cpu architecture, platform, architecture
platform::shell 1.1.4 platform::shell(n)