I'm trying to capture the date/time portion of "ls -l" command as a file, but it puts a "blank line". How do I make it so that output file doesn't include a blank line?
Example 1 (saved as a variable works good):
var1=`ls -l /file1 | awk '{print $6,$7,$8}'`
echo $var1
May 24 23:06
Example 2...
I'm unable to move a file that I do not own but I'm part of the group the file is assigned to.
Here's the scenario:
userA owns file1
userA belongs to groupX
userB belongs to groupX
file1 has rights of 666
file1 is located in dir1
dir1 and dir2 are owned by userB
dir1 and dir2 are group owned...
Thanks for your input DukeSSD.
I was also leaning towards Virtual Ethernet Adapter method.
fyi: there are two frames connected via a switch used to connect the two frames to be on one subnet.
I'm trying to configure NIM Master server with 30 clients on Virtual Ethernet Adapter network because the current network setup will not work with NIM for me (bootp can't find the master). Probably need to create a new network to get it to work.
My environment is 2 P5-590's (connected via...
PHV,
It works as a one liner, but I get an error when I put it in a script:
#!/usr/bin/ksh
ssh server1 awk -F":" '$1!~/^[a-z][0-9][0-9][0-9][0-9]$/{print $1}' /etc/passwd
Syntax Error The source line is 1.
The error context is
>>> !~ <<<
awk: 0602-540 There is a...
I need help with a script to find only users that starts with a alpha character followed by 4 digits (ie. a9999).
Here's what I did so far (not working):
#!/usr/bin/ksh
cat /etc/passwd | awk -F: '{print $1}' |
while [[ $MORE -ge 1 ]]
do
read USER
if [ len(USER) == 5 ]
then...
I have two files that contains just file names.
The first files has the nfs mount points (ie. /mnt, /nfs1, etc.)
Second file has long file names (ie. /usr/bin/perl, /nfs1/file1, etc.)
I want the third file to contain only the non-nfs mounted files.
Example:
file1:
/mnt
/nfs1
/nfs2
file2...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.