7
using standard input in shell scriptview story

http://stackoverflow.com – I always run my shell with a command: ./shellName file1 file2 So, in the shell, I can refer file1 as $1 and file2 as $2. However, if I want to run the shell with this command ./shellName < file1 > file2 I tried to read the file1 as standard input and file 2 as standard output. How can I refer file1 and file2 in the shell script? Can I still use $1 and $2? Thanks in advance. (HowTos)

7
Linux, How to sort the lines of a fileview story

http://stackoverflow.com – I have a file called abc. The content of abc is: ccc abc ccc ccc a b dd ccc I want to sort the lines of the file and delete all duplicates (in this case ccc are duplicates). In the shell script I use this: sort -u < $1 But the sorted result becomes the standard output instead of saved into the abc file. How do I do this? (HowTos)

7
timestamp accuracy on EXT4 (sub millsecond)view story

http://stackoverflow.com – I was writing some code in Vala where I would first get the system time, then create a file, then retrieve the time stamp of that file. The timestamp would always be earlier that the system time, somewhere between 500 and 1500 micro seconds which didn't make sense. (HowTos)

7
shell script not sending mail accurately using SMTP serverview story

http://stackoverflow.com – I wrote script to send mail automatically using SMTP Connection but when i execute script sometimes it works and sometimes it is not sending mail. (HowTos)

7
Help me!how to run autosys command in UNIX shell scriptview story

http://www.unix.com – Hi all, Here is my scenario.. i need to get dates from an existing autosys calendar and compare it with current date with in a unix shell script. Please help me out and give me an approach to handle this....... the general autosys calendar command used is autocal_asc ,but this is an interactive command. Please let me know if you need any further details (HowTos)

7
Proper place to put shell prompt(PS1) when use sh/bash/zsh togetherview story

http://unix.stackexchange.com – I'm using dash(sh) or bash or zsh. If possible, I would prefer to put in common place. I want to put proper PS1 settings when I interactive with shell, so these situation should be considered login (show PS1) su sudo script (Don't show PS1) I was put PS1 on .bashrc, but it seems not always workable. (HowTos)

7
Generate tabular data based on a column value from an existing data fileview story

http://www.unix.com – Hi, I have a data file with : 01/28/2012,1,1,98995 01/28/2012,1,2,7195 01/29/2012,1,1,98995 01/29/2012,1,2,7195 01/30/2012,1,1,98896 01/30/2012,1,2,7083 01/31/2012,1,1,98896 01/31/2012,1,2,7083 02/01/2012,1,1,98896 02/01/2012,1,2,7083 02/02/2012,1,1,98899 02/02/2012,1,2,7083 I need to find the first occurring date and the last occurring date for a particular value in column 4 (HowTos)

7
Setting the path permanently using shell scriptview story

http://www.unix.com – I'm trying to set the path permanently through a shell script. (/opt/quest/bin:/usr/bin/lab to /.profile.) I tired using echo option like below but it doesn't work. Please suggest me the right way to do so. echo "PATH=$PATH:/opt/quest/bin:/usr/bin/lab" >> /.profile (HowTos)

7
Different cmd to execute and based on some pattern parse it and then store result in xlx formatview story

http://www.unix.com – Hi I have a different requirement, I need to run some application on my device from a file app_name.txt one by one which is like this: /usr/apps/email /usr/apps/message /usr/apps/settings after each app while it is running I need to execute again one cmd like ps -ef |grep /usr/apps/email then this cmd will give output like this: user 6423 6602 0 11:23 pts/4 00:00:00 /usr/apps/e (HowTos)

7
Using sed to replace a word at specific locationview story

http://www.unix.com – I'm try to change a the prohibit to aix for the lines starting with ssh and emagent and rest should be the same. (HowTos)