I tried this,
#!/bin/ksh
for i in {1..10}
do
echo "Welcome $i times"
done
in Ksh of an AIX box.
I am getting the output as,
Welcome {1..10} times
What's wrong here?
Thanks.
How can you suppress the 'Terminated' message that comes up after you kill a process in a bash script?
I tried set +bm, but that doesn't work.
I know another solution involves calling 'exec 2 /dev/null', but is that reliable? How do I reset it back so that I can continue to see stderr?
Thanks
I want to replace new lines in text with coma or space but do not change the last new line.
I know of this question: How to replace new lines with tab characters - but it does produce an tab on end instead of new line.
So far I have come with:
awk 'NR>1{printf","} {printf $1} END{printf"\n"}'
Is there an easier way to do this? This is not…
In a script you must include a #! on the first line followed by the path to the program that will execute the script (e.g.: sh, perl). As far as I know though, the # character denotes the start of a comment and that line is supposed to be ignored by the program executing the script. It would seem though, that this first line is at some point read…
I've got 80,000 users on my site and i've recently turned away from the forum script i've been using and built something very simple myself that works just as well (the forum script was too bloated and resource intensive for my simple site)
The only thing i've lost is the ability to mass email all my members.
So i'm looking to come up with a…
I want to find files older than N days from a given timestamp in format YYYYMMDDHH
I can find file older than 2 days with the below command, but this finds files with present time
find /path/to/dir -mtime -2 -type f -ls
Lets say I give the input timeSamp=2011093009 so I want to find files older than 2 days from 2011093009
Been doing my…
When working with files on my mac I employ a mixed approach of shell/finder or keyboard/mouse, similar to working with 4NT and Explorer on Windows.
One thing I use(d) extensively on Windows is to copy the path of the current directory to the clipboard. This is an extended feature of TakeCommand by JPSoft, on Windows.
Is there a way to…
Telligent Community combines blogs, wikis, forums, and file-sharing capabilities into a single product with single sign-on, using all Microsoft technologies. Is there an equivalent offering that runs on Unix/Linux? Or would I have to pick and choose individual product offerings and figure out another option for single sign-on across…
Telligent Community combines blogs, wikis, forums, and file-sharing capabilities into a single product with single sign-on, using all Microsoft technologies. Is there an equivalent offering that runs on Unix/Linux? Or would I have to pick and choose individual product offerings and figure out another option for single sign-on across…
I'm a bit confused about the installation of standard Unix packages on Mac OS X. For example, I have /usr/bin/svn, which is SVN v.1.4.4, but FinkCommander says svn is not installed. The same holds for other packages, like emacs etc.
Is that just a wrong FinkCommander setting? Currently it is set to install everything in /sw, which is…
I have been a UNIX user for more years than I care to think about, and in that time I have been trained to expect that when contradictory switches are given to a program the last one wins. Recently I have noticed that
cat -bn file
and
cat -nb file
both use the -b option (number blank lines) over the -n option (number all…
The
core of any file server is its file system and ZFS provides the
foundation on which we have built our ubiquitous file sharing and single
access control model. ZFS has a rich, Windows and NFSv4 compatible,
ACL implementation (ZFS only uses ACLs), it understands both UNIX IDs
and Windows SIDs and it is integrated…
I have a dump of thousands of small text files (1-5MB) large, each containing lines of text. I need to "batch" them up, so that each batch is of a fixed size - say 100MB, and compress that batch.
Now that batch could be:
A single file that is just a 'cat' of the contents of the individual text files, or
Just the individual…
I've read documentation for various ftp daemons and various long threads about the security implications of using a chroot environment for an ftp server when giving users write access. If you read the vsftpd documentation, in particular, it implies that using chroot_local_user is a security hazard, while not using it is not.…
I run Linux, and am used to selecting text with the mouse to copy and pressing shift-Ins to paste. (This uses an alternate clipboard known as the "Primary Selection".)
This seems to work in every app besides Firefox. Firefox uses a different clipboard, where Ctrl-C copies and Ctrl-V pastes. Is there a keystroke or…
The recommendation used to be "Do not write in-process shell extensions in managed code."
But with .NET Framework 4 and In-Process Side-by-Side the main reason not to write shell extensions in managed code should be resolved.
With that said, I have three questions.
Is it now okay to write shell extensions in…
I'm interested in experimenting with replacing our dependency on MKS with MS' Sevices for Unix toolset. I was wondering if anyone has any experience with deploying SFU on a shared drive? We like to, wherever possible, host our dev tools on one central NAS and call to the NAS to access the tools instead of…
Before yesterday, I used only lower case letters, numbers, dot (.) and underscore(_) for directories and file naming.
Today I would like to start using more special characters. Which ones are safe (by safe I mean I will never have any problem)?
ps : I can't believe this question hasn't been asked…
When using any java application in gnome-shell if the window is maximised the pointer position is way off; but only on the menu's, in the editor, or the side panel, the pointer is fine.
This only presents itself when the window is maximized, and it seems that the further away from 0x0 the window is…
Is it possible to use another shell for scripts than for standard terminal use?
The problem is, i use fish as shell at the moment and i find i very convenient.
But i would like to learn a bit of shell programming in Ubuntu. Since there are differences between those two it would be nice, to work…
Is there a way for a unix socket listener to only accept connection from certain user (chmod/chown does not work for abstract socket afaik), or in another word, get the uid of the incoming connection (on Linux)?
Dbus, which uses abstract unix socket on Linux, has a function…
How do I fix this? I will attempt to upload a screenshot of the problem. Notice there is an error like triangle near the shell themes and nothing is select-able. Also there are no shell extensions under the shell extensions tab. I have come across many postings on how to…
Back in 2006 I wrote a blog post titled: Managed code and the Shell – Don't!. Please visit that post to see why that advice was given.The crux of the issue has been addressed in the latest CLR via In-Process Side-by-Side Execution. In addition to the MSDN documentation I…
I search all around the internet till the 6th page of result on google with very precise search, but I can't figure how I can do that.
I'm working with last updated ubuntu 12.04 and gnome shell, and I wonder how I can REMOVE and I say remove not clear or avoid feeding…