![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep command | christine33990 | UNIX for Dummies Questions & Answers | 11 | 05-06-2008 03:45 AM |
| how to exclude the GREP command from GREP | yamsin789 | UNIX for Advanced & Expert Users | 2 | 10-05-2007 03:59 AM |
| grep command help | ishmael^soyuz | Shell Programming and Scripting | 4 | 07-11-2007 10:01 AM |
| grep command | pmsuper | UNIX for Dummies Questions & Answers | 6 | 11-22-2006 07:12 AM |
| grep command | debasis.mishra | Shell Programming and Scripting | 1 | 03-28-2006 02:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help need in Grep Command
Hi
I am assaging a variable like this current_dir ='ps -o user|grep -v'USER'|uniq' #this would print the user id " v_name=`date +%m%d%y` outputfile =$v_name$current_dir.txt this gives the output file with timeanddate .txt but not the userid lets assume i have the userrid called uuuu1 and time 1507 the output file should be uuuu11507.txt can you help me on this !!!!!!!!! |
|
||||
|
current_dir ='ps -o user|grep -v'USER'|uniq' #this would print the user id "
v_name=`date +%m%d%y` Assuming current_dir has username and v_name has date and time. file name u should use ${current_dir}${v_name}.txt Ur filename looks like uday101007.txt |
![]() |
| Bookmarks |
| Tags |
| awk, awk trim, trim, trim awk |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|