Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: zedex
2,102
Posted By zedex
This is very rough code in python idle ...
This is very rough code in python idle


>>> text="""hello sorry
yellow green
""".splitlines()
>>> mapping = {}
>>> for pair in text:
(key, val) = pair.split(" ")
if not key in...
1,970
Posted By zedex
did you try anything? What lang you are...
did you try anything?
What lang you are planning to use?

In perl there is XML::Simple module available, just read the file using module, use Data::Dumper to see how data is formatted in perl...
629
Posted By zedex
can you provide sample i/p? I think using...
can you provide sample i/p?

I think using has with "${hostname}-${vg}" as a key and other things as values of that key. This should be fairly simple
1. read the first file in hash
2. read...
7,212
Posted By zedex
i can not think of any other option ( maybe perl...
i can not think of any other option ( maybe perl script (http://perldoc.perl.org/File/Fetch.html) but you might have to download and install module(s) - not sure about this one )

for wget on...
2,240
Posted By zedex
sample input and desired output? i am not getting...
sample input and desired output? i am not getting a condition for splitting the data!
7,212
Posted By zedex
1. try "curl" 2. if you have SVN on unix box...
1. try "curl"

2. if you have SVN on unix box try svn export <svn_url>
1,514
Posted By zedex
check the TERM variable? set it to TERM=xterm and...
check the TERM variable? set it to TERM=xterm and try if vim is highlighting syntax

I syntax highlighting issue setting proper terminal fixes with xterm + bash shell.
3,678
Posted By zedex
Run this command and check whats is getting...
Run this command and check whats is getting tarred!!

tar -tvf <tar_file>
1,201
Posted By zedex
1. If you are running a command from perl why...
1. If you are running a command from perl why don`t you open file directly and do it with perl OPEN function?
2. while you are running the command you need to escape $ & " in command line, those are...
1,733
Posted By zedex
Not sure if i understood you correctly, you need...
Not sure if i understood you correctly, you need want to list .mak files and then create file for every listed .mak file under some directory!!

Not tested!!


ls -l *mak | cut -d. -f1 | xargs...
1,708
Posted By zedex
ok .. i might be wrong but this looks like 1 file...
ok .. i might be wrong but this looks like 1 file created everyday ? if yes then read on ..

if files are created according to dates then you can use "ls -lrt" and that will sort the file for you...
3,431
Posted By zedex
Thats just an example, before loading you would...
Thats just an example, before loading you would set PATH variable or use function with complete path/to/scrtipt so that you dont have to set PATH
3,431
Posted By zedex
I faced similar issue while i was developing...
I faced similar issue while i was developing tools for navigating to different directories, I wrote script to change user CWD to desired one (from the inputs provided) but as script used to run in...
8,031
Posted By zedex
Well i am not 100% clear about what you want to...
Well i am not 100% clear about what you want to do, but i think you want to read the "New.txt" file and then start all the jobs inside that file and restart the server (not sure which servers, may be...
2,664
Posted By zedex
#!/usr/bin/perl $LimitsFile =...
#!/usr/bin/perl

$LimitsFile = "/home/sriram/perl_scripts/limits.conf";

my $RefValue = {
nofile => 131072,
noproc => 131072,
...
2,201
Posted By zedex
check the no. of processes a user can run? Its...
check the no. of processes a user can run? Its setup on the box / server. I am not sure about the parameter for that but i remember we used to set that limit to 4000 and if anyone tried to create new...
3,525
Posted By zedex
grep -B2 comp <file> Well this is not the...
grep -B2 comp <file>


Well this is not the ideal solution! as different systems have different flavors of grep (http://unixhelp.ed.ac.uk/CGI/man-cgi?grep)

See if it matches with your...
1,073
Posted By zedex
tee (http://unixhelp.ed.ac.uk/CGI/man-cgi?tee) is...
tee (http://unixhelp.ed.ac.uk/CGI/man-cgi?tee) is used for printing on terminal and writing to file!!

well i am not sure what it will do but just giving a try ( i dont have terminal in front of me...
2,240
Posted By zedex
How about this 1 liner find . -perm 644 |...
How about this 1 liner

find . -perm 644 | xargs -iFile chmod 666 File
603
Posted By zedex
Hi, syntax looks okay to me. "Its not...
Hi,

syntax looks okay to me. "Its not working" is generalized statement, its not working as you expect it to work or its simply throwing error ?

do post some sample input & output.
1,176
Posted By zedex
Quick code, but shell script $ if [ grep...
Quick code, but shell script


$ if [ grep -q 'abcd' a.txt ]; then
<DO SOMETHING / LEAVE IT BLANK>
else
echo "abcd" >> a.txt
fi


* in perl code, you would read a file in an array
*...
5,128
Posted By zedex
It works on RH4 , let me know if it works for you...
It works on RH4 , let me know if it works for you

$ bash
$ touch {1..10}.txt
$ ls -lrt *.txt
2,555
Posted By zedex
assuming ignore list is created with ignore...
assuming ignore list is created with ignore extensions on each line .. like suggested by Chubler_XL.. here is my take.. i directly writing here so there can be syntactical error.


$ cat...
2,522
Posted By zedex
try expect utility ..
try expect utility ..
2,855
Posted By zedex
Try this, this should work. I am not sure about...
Try this, this should work. I am not sure about your goal here.

If it works try to find answers to why changing approach worked!


find(\&check, $dir);

sub check {
if ($_ =~ /.xml/)
...
Showing results 1 to 25 of 182

 

Featured Tech Videos

All times are GMT -4. The time now is 07:19 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy