Search Results

Search: Posts Made By: radoulov
132,747
Posted By MadeInGermany
Stay young with zsh! zsh is powerful and fast...
Stay young with zsh!
zsh is powerful and fast and safe.
I see that SuSE 11 SP3 has added support for a zsh login shell.
Could a moderator please add /bin/zsh to the voting list?
132,747
Posted By Don Cragun
Done.
Done.
Forum: Solaris 07-16-2014
6,676
Posted By Corona688
This also works slightly similarly in Linux but...
This also works slightly similarly in Linux but you can't actually get the file size from there:

$ echo asdf > file # Create dummy file
$ exec 5<file # Open file
$ rm file # Delete file
$ ls -l...
Forum: Solaris 07-16-2014
6,676
Posted By RudiC
As for the file size, use stat (if available on...
As for the file size, use stat (if available on your system) with -L option to dereference the link:stat -L /proc/self/fd/5
File: ‘/proc/self/fd/5’
Size: 5 Blocks: 8 IO...
Forum: Solaris 07-16-2014
6,676
Posted By jlliagre
I'm late in that thread but anyway, you don't...
I'm late in that thread but anyway, you don't need lsof as it is relatively easy to identify using standard Solaris commands what processes have deleted files and on which file descriptors. Simply...
Forum: Solaris 05-26-2014
57,498
Posted By jlliagre
Out of ~49 GB, there is 26 GB or free RAM in the...
Out of ~49 GB, there is 26 GB or free RAM in the first posting (sar/vmstat) and 30 GB in the second one (::memstat), not that much a difference.
8,625
Posted By alister
That code is vulnerable to pattern matching...
That code is vulnerable to pattern matching metacharacters. For this approach to work with arbitrary text, it is necessary to double-quote the nested parameter expansion.

$ s=*****a
$ echo "$s"...
1,141
Posted By drl
Hi. I like the solution of radoulov. I also...
Hi.

I like the solution of radoulov. I also like to break tasks down into manageable steps. One way to do that is to use code that packages up common tasks. A source for that is the missing...
Forum: Solaris 03-28-2014
5,718
Posted By achenle
Truncating an open file is not guaranteed to...
Truncating an open file is not guaranteed to work. The mode the file descriptor is in matters, as does the ability of the underlying file system to support sparse files. If the mode is "wrong", and...
Forum: Solaris 03-25-2014
5,718
Posted By jlliagre
Truncating the unlinked file will certainly work...
Truncating the unlinked file will certainly work with ZFS too.
2,758
Posted By kurumi
if you have Ruby # ruby -F"\s+" -ane...
if you have Ruby

# ruby -F"\s+" -ane '$F[3..-1].each{|x| puts $F[0..2].join(" ") + " " + x }' file
LG1 R500 A-170 F1:81
LG1 R500 A-170 F1:22
LG1 R500 A-170 F2:32
LG1 R500 A-170 F1:71
LG1 R700...
2,603
Posted By Don Cragun
Yes. According to the standards, test's =...
Yes. According to the standards, test's = operator compares strings; not filename matching patterns and not regular expressions. The test utilities in some shells support operators and expressions...
2,603
Posted By Don Cragun
Here is a sample script that shows a few ways to...
Here is a sample script that shows a few ways to do what you're trying to do that work with both bash and ksh:printf "Enter answer: "
while read answer
do if [ "$answer" = "y" ] || [ "$answer"...
Forum: AIX 11-05-2013
6,880
Posted By bakunin
AIX' grep has the (non-standard, i believe)...
AIX' grep has the (non-standard, i believe) option "-p", which searches for "paragraphs" - groups of lines separated by blank lines, unless a "paragraph separator" is specified.

AIX man page of...
1,300
Posted By Scott
wget is actually downloading a "Thank you for...
wget is actually downloading a "Thank you for downloading Skype" page (you can view the downloaded file in a Web Browser). You will need to find a direct download link, or download the file manually...
2,701
Posted By Don Cragun
In addition to what bakunin and in2nix4life have...
In addition to what bakunin and in2nix4life have said, using x\bx\bx (where x is any printing character and \b is a backspace character) is a remnant of the days before CRT terminals. On a hardcopy...
35
3,753
Posted By Don Cragun
Hi Robin, The eval command isn't evil, it is...
Hi Robin,
The eval command isn't evil, it is just dangerous to use it to evaluate any user supplied text. In a script, it can be used safely to evaluate commands when the command is entirely under...
2,079
Posted By Don Cragun
Sorry, but no. UNIX text files do not have an...
Sorry, but no. UNIX text files do not have an End-of-File character. Each line in a text file is terminated by a <newline> character. If you have a file open in vi and issue the commands:
:1,$d...
2,131
Posted By alister
You will continue to trigger that error so long...
You will continue to trigger that error so long as the contents of the txt file in the highlighted command substitution exceed your system's available memory (or process mem limit).

Regards,...
Forum: Cybersecurity 03-24-2013
2,217
Posted By Don Cragun
When a user logs into a UNIX system, the login...
When a user logs into a UNIX system, the login name used is saved in a system database and in the environment variable LOGNAME. The file(s) containing the database where it is stored varies from...
1,087
Posted By Jotne
@Scrutinizer A very nice solution. I did use...
@Scrutinizer
A very nice solution. I did use nearly one hour to study this simple work to find out how it works. I do admire how you guys manage to find this clever simple solution to the...
1,408
Posted By binlib
(GNU) sort on Linux has a -z option to sort NULL...
(GNU) sort on Linux has a -z option to sort NULL delimited, multi-line records:
sed 's/^2013/\x0&/' log-file |sort -z |tr -d '\0'
5,298
Posted By Don Cragun
Good point! zsh would require the nonomatch...
Good point! zsh would require the nonomatch option enabled to match the literal [F03*].[/QUOTE]
It was careless of me to use the term match for the case when none of the four single characters...
981
Posted By Scrutinizer
Advice for forum posts, general: To obtain...
Advice for forum posts, general:

To obtain the best answers quickly for processing datasets --
extracting, transforming, filtering, you should, after having
searched for answers (man pages,...
1,729
Posted By RudiC
Minor comment to Don's fine proposal: replacing...
Minor comment to Don's fine proposal: replacing the s[NR] assignment with s[NR] = sprintf ("-%c", ++c[$1]+96) # assign lower case letter in increasing sequence
would get rid of the BEGIN...
Showing results 1 to 25 of 106

 

Featured Tech Videos

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