- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: help easy
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2008 03:12 PM
тАО02-07-2008 03:12 PM
I have a script
echo "input:" 8b 8c 8d
read $B
for i in $B
## the command #
pixar -p $B >log
the output : is invalid command
the option -p only accept one parameter
pixar -p 8b 8c 8d
since do it
and howto delete lines in log
cat.log
aaaaaaaa
bb
fd
jg
9sf9 ffff
a need deleted lines with space blank, line bb, fd jg
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2008 03:14 PM
тАО02-07-2008 03:14 PM
Re: help easy
>log (* will zero out log but keep the file *)
touch log (* same as above *)
rm log (* deletes *)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2008 03:44 PM
тАО02-07-2008 03:44 PM
Re: help easy
attach the log correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2008 05:35 PM
тАО02-07-2008 05:35 PM
Re: help easy
If I understand correctly, you want to delete lines with leading whitespace (tabs and/or spaces). One way is:
# perl -ne 'print unless m{^\s+}' file
Regards!
...JRF...
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2008 03:11 AM
тАО02-08-2008 03:11 AM
Re: help easy
This should be: read B
for i in $B
pixar -p $B >log
Did you want to do pixar for every value you read in B?
for i in $B; do
pixar -p $i >log"
done
Another solution to delete lines with leading spaces/tabs:
$ grep -v "^[ ]" log
Where the [] contains a space then a tab.
Or you can do the following for all whitespace:
$ grep -v "^[[:space:]]" log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2008 09:26 AM
тАО02-08-2008 09:26 AM
Re: help easy
echo $B is : 8b 8c 8d
but command pixar only accept one value
the correct command is
pixar -p 8b
.....
....
pixar -p 8b 8c d
invalid command
I need in B input value 8b 8c 8d
and the command pixar -p execute one value only
I cant send 8b 8c 8d to a file
so:
for i in `cat B.input`
do
...
pixar -p $i
I no want to create files
understant?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2008 10:25 AM
тАО02-08-2008 10:25 AM
Re: help easy
thansk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2008 10:25 AM
тАО02-08-2008 10:25 AM
Re: help easy
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2008 10:29 AM
тАО02-08-2008 10:29 AM
Re: help easy
read Dennis' solution again to see, that there is no need for a temporary file:
B='8a 8b 8c'
for i in $B
do print val=$i
done
results in an output of
val=8a
val=8b
val=8c
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2008 10:33 AM
тАО02-08-2008 10:33 AM
Re: help easy
, I do not what post
You can try other post