Dear Friends,
Can Any one provide me script to generate list of username with the gecos field.
Code:
(cat /etc/passwd | cut -d: -f1,5)
Please note i have to run this command from nim server and i have password less ssh access.(ssh hostname command)
and i want a file to be generated on nim server.
Thanks in advance !!:b:
Regards,
Vinod
Moderator's Comments:
Hi Moderator,
Can you please help me delete my posts ?
Post is closed now, not able to edit and delete it.
http://www.unix.com/shell-programmin...re-output.html
Regards,
Amit
I have just started learning the fundamentals of Unix and wondering why there are so many shells in a unix like system .
i'm some what new to ubuntu linux.. i need to run the shell script from a html code. as i read some where like using apache2 to generate a html and some how i'm succeded to run sh file from html, but i'm unable to see the command prompt which executes the commmands in sh script. it's running may be as a daemon...
I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like
Code:
ssh hostname path ksh HC_Report.ksh>out.html
...but it generates the HTML file in
remote desktop .i wnt the same cmd(ksh HC_Report.ksh>out.html) to be executed on unix server..s der any p
hi Experts...
I m trying to run a batch script in Windows server which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like
ksh HC_Report.ksh>out.html...but it generates the HTML file in
windows server.i wnt the same cmd(ksh HC_Report.ksh>out.html) to be executed on unix server..s der any possibilitie
Hi,
I am trying with the below Perl command to print the first field when the second field matches the given pattern:
Code:
perl -lane 'open F, "< myfile"; for $i (<F>) {chomp $i; if ($F[1] =~ /patt$/) {my $f = (split(" ", $i))[0]; print "$f";}} close F' dummy_file
I know I can achieve the same with the following thread: http://www.unix.com/shell-progr
In end of http://www.unix.com/shell-programmin...les-shell.html
mjd_tech gives script which can read some values directly without manually input, but if no value is the right one, my understand is, it will on hold for waiting the next input, but when I run below codes, it keeps running and refresh my screen.
Code:
while [ "$line" != "Fred" ]; do
read l
hey all,
I have this code :
Code:
#!/bin/tcsh -f
set line=($<)
while($#line > 0)
echo $line[1]
set line=($<)
end
the usage to run the script would be :
Code:
./file < file2
Is there a way to specify filename in the script itself instead of getting/reading file name from STDIN ?
Using :
Code:
set file=data
instead of :
Code:
set line=($&